PHP code example of kylekatarnls / coffeescript
1. Go to this page and download the library: Download kylekatarnls/coffeescript library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kylekatarnls / coffeescript example snippets
ad manually
CoffeeScript\Init::load();
$file = 'path/to/source.coffee';
try
{
$coffee = file_get_contents($file);
// See available options above.
$js = CoffeeScript\Compiler::compile($coffee, array('filename' => $file));
}
catch (Exception $e)
{
echo $e->getMessage();
}