Adrian 2f82b75862 implement coffeescript.registerCompiled method (#5130)
* implement coffeescript._addSoucrse method

This method enables an external module to implement caching of
compilation results. When the compiled js source is loaded from cache,
the original coffee code should be added with this method in order to
enable the Error.prepareStackTrace below to correctly adjust the stack
trace for the corresponding file (the source map will be generated on
demand).

* replace _addSource with registerCompiled

* extract the logic from _compileFile into _compileRawFileContent

_compileFile takes care of logging the file and calls _compileRawFileContent

this way an external caching implementation which computes cache key
based on raw content of the sources file, can reuse the logic of
_compileFile and avoid having calling `fs.readFileSync` for the file
more twice in case of cache miss

* remove 'output' argument from registerCompiled
2018-11-28 09:09:06 -08:00
2018-09-19 23:53:49 -07:00
2018-09-19 23:53:49 -07:00
2018-09-09 13:41:49 -07:00
2018-04-28 18:57:15 -07:00
2018-04-28 18:57:15 -07:00
2018-09-09 13:41:49 -07:00
2018-02-26 22:18:13 -08:00
2018-04-28 18:57:15 -07:00
2018-05-21 22:14:34 -07:00
2018-09-09 13:41:49 -07:00
2018-09-19 23:53:49 -07:00
2018-05-21 22:14:34 -07:00
2018-05-21 22:14:34 -07:00
2017-02-12 17:00:05 -08:00
2017-02-12 17:00:05 -08:00

      @@@@@@@                @@@@  @@@@@
     @@@@@@@@@@              @@@   @@@                                           {
    @@@@     @@              @@@   @@@                                        }   }   {
   @@@@          @@@@@@@    @@@   @@@     @@@@@@    @@@@@@                   {   {  }  }
  @@@@          @@@   @@  @@@@@  @@@@@@  @@@   @@  @@@@  @@                   }   }{  {
  @@@@         @@@@   @@   @@@    @@@   @@@   @@@ @@@   @@@                  {  }{  }  }
  @@@@        @@@@    @@   @@@    @@@   @@@@@@@@  @@@@@@@@                  { }{ }{  { }
  @@@@@       @@@@   @@    @@@    @@@   @@@       @@@                     {  { } { } { }  }
   @@@@@@@@@@ @@@@@@@@    @@@    @@@    @@@@@@@@  @@@@@@@@                 { }   { }   { }
      @@@@@               @@@    @@@      @@@@@     @@@@@           @@@@@@   { }   { }    @@@@@@@
                         @@@    @@@                                 @@@@@@@@@@@@@@@@@@@@@@@@@@@@
      @@@@@@            @@@    @@@                                @@ @@@@@@@@@@@@@@@@@@@@@@@@@@
   @@@@    @@          @@@   @@@@                                @@   @@@@@@@@@@@@@@@@@@@@@@@@
   @@@@   @@@                       @@                  @@@@     @@@   @@@@@@@@@@@@@@@@@@@@@
   @@@@@          @@@@@   @@  @@   @@@     @@@@@@@     @@@@@      @@@    @@@@@@@@@@@@@@@@@@
     @@@@@      @@@  @@@ @@@@@@@@         @@@@  @@@@  @@@@@@@       @@@   @@@@@@@@@@@@@@@@
       @@@@@   @@@       @@@@     @@@@    @@@    @@@   @@@                 @@@@@@@@@@@@@@
 @@@@@  @@@@  @@@@      @@@@      @@@@   @@@@   @@@@  @@@@
@@@     @@@@  @@@       @@@@     @@@@    @@@    @@@@  @@@@
@@@     @@@@  @@@@     @@@@      @@@@   @@@@   @@@@  @@@@
 @@@@@@@@@     @@@@@@  @@@@       @@@@  @@@@@@@@@    @@@@
                                       @@@          @@@@
                                      @@@
                                      @@@

CoffeeScript is a little language that compiles into JavaScript.

Installation

Once you have Node.js installed:

# Install locally for a project:
npm install --save-dev coffeescript

# Install globally to execute .coffee files anywhere:
npm install --global coffeescript

Getting Started

Execute a script:

coffee /path/to/script.coffee

Compile a script:

coffee -c /path/to/script.coffee

For documentation, usage, and examples, see: https://coffeescript.org/

To suggest a feature or report a bug: https://github.com/jashkenas/coffeescript/issues

If youd like to chat, drop by #coffeescript on Freenode IRC.

The source repository: https://github.com/jashkenas/coffeescript.git

Changelog: https://coffeescript.org/#changelog

Our lovely and talented contributors are listed here: https://github.com/jashkenas/coffeescript/contributors

Description
No description provided
Readme MIT 47 MiB
Languages
CoffeeScript 64.6%
JavaScript 35.4%