comal
Tacoscript transformation core.
Originally forked from babel-core
. Significant differences include removal
of hardcoded ids, allows custom generators and parsers, uses comal-types
and
comal-traverse
instead of their babel counterparts, and splits up babel-core's
File
(which contains the data and performs the transformation) into
Transformation
(which just performs the transformation) and File
(which just
contains the data).
Install
$ npm install comal
Usage
; const minimalBabel = parser: { return highlightCode: optshighlightCode sourceType: optssourceType filename: optsfilename plugins: ; } generator: generate: default { return filename: optsfilename }; // not implemented yetconst tacoscriptCompiler = parser: generator: ; const code = `a = () ->`;const result = tacoscriptCompiler; resultcode; // Generated JavaScript coderesultmap; // Sourcemapresultast; // AST ;; // whitespace-preserved tacoscript; // whitespace-preserved javascript ;; // Generated tacoscript code
format of api config
For now, see cleanMeta()
in options/loader
and transformation/index