PHP code example of coffeescript / coffeescript

1. Go to this page and download the library: Download coffeescript/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/ */

    

coffeescript / 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();
}