The Dart to ECMAScript 6 transpiler
For design doc & TODO's, see wiki page
Get dependencies with pub get
then run:
./dart2es6 input_path.dart -o output_path.js
See --help
for more options.
AngularDart's change detection library is included in the change_detection
folder as an example.
The folder included here has been modified from the original with some unsupported code removed.
To transpile this example:
cd change_detection
./transpile
The output will be located in change_detection/out
Uncomment line in change_detection/transpile
to transpile change detection tests as well.
Currently, change detection and its tests transpile incorrectly since some code are not supported. See design doc for more info.
Install dependencies:
- Install
node
andnpm
- Install
traceur
:npm install -g traceur
Then run unit tests:
mkdir -p test/out/preprocessor test/out/traceur test/out/transpiler
dart -c test/test_runner.dart
Check environment is set correctly. See scripts/travis/setup.sh
and scripts/travis/build.sh
.