es6-module-transpiler
Advanced tools
Comparing version 0.3.6 to 0.4.0
{ | ||
"name": "es6-module-transpiler", | ||
"version": "0.3.6", | ||
"version": "0.4.0", | ||
"description": "es6-module-transpiler is an experimental compiler that allows you to write your JavaScript using a subset of the current ES6 module syntax, and compile it into AMD, CommonJS, and globals styles.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://square.github.com/es6-module-transpiler", |
@@ -22,8 +22,18 @@ # ES6 Module Transpiler [![Build Status](https://travis-ci.org/square/es6-module-transpiler.png)](https://travis-ci.org/square/es6-module-transpiler) | ||
### Build tools | ||
The easiest way to use the transpiler is from an existing build tool. There several plugins developed for different build tools: | ||
* **Grunt:** [grunt-es6-module-transpiler](https://github.com/joefiorini/grunt-es6-module-transpiler), maintained by @joefiorini | ||
* **Gulp:** [gulp-es6-module-transpiler](https://github.com/ryanseddon/gulp-es6-module-transpiler), maintained by @ryanseddon | ||
* **Brunch:** [es6-module-transpiler-brunch](https://github.com/gcollazo/es6-module-transpiler-brunch), maintained by @gcollazo *(CommonJS only)* | ||
* **Broccoli:** [broccoli-es6-concatenator](https://github.com/joliss/broccoli-es6-concatenator), maintained by @joliss | ||
* **Mimosa:** [mimosa-es6-module-transpiler](https://github.com/dbashford/mimosa-es6-module-transpiler), maintained by @dbashford | ||
### Executable | ||
The easiest way to use the transpiler is via the command line: | ||
The transpiler can be used directly from the command line: | ||
``` | ||
$ npm install -g https://git.squareup.com/javascript/es6-module-transpiler | ||
$ npm install -g es6-module-transpiler | ||
$ compile-modules foo.js --to compiled | ||
@@ -36,3 +46,3 @@ ``` | ||
compile-modules FILE [FILE…] --to OUTPUT [--type=TYPE] | ||
[--anonymous] [--module-name=NAME] | ||
[--infer-name] [--module-name=NAME] | ||
[--global=GLOBAL] [--imports=IMPORTS] | ||
@@ -51,5 +61,6 @@ | ||
ANONYMOUS | ||
If you use the --anonymous flag with the AMD type, the transpiler will output | ||
a module with no name. | ||
INFER-NAME | ||
If you use the --infer-name flag with the AMD or YUI type, the transpiler will | ||
generate a name for the module from its file path. The default is to output | ||
anonymous modules. | ||
@@ -297,10 +308,2 @@ NAME | ||
## Using with Node.js/Grunt | ||
You can use this library to pre-transpile your browser code or your node | ||
packages however you wish, but the easiest way to do it is probably to use the | ||
[grunt-es6-module-transpiler](http://github.com/joefiorini/grunt-es6-module-transpiler) | ||
plugin to run the transpiler as part of your [Grunt.js](http://gruntjs.com) | ||
build task. See the README on the plugin's Github page for more information. | ||
## Installation | ||
@@ -307,0 +310,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
279956
348
6241