mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-14 09:17:55 -05:00
* 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