Comparing version 0.4.0 to 0.5.0
@@ -6,2 +6,3 @@ var fs = require('fs'); | ||
var es6class = require('es6-class'); | ||
var es6defaultParams = require('es6-default-params'); | ||
var es6restParams = require('es6-rest-params'); | ||
@@ -46,11 +47,12 @@ var es6templates = require('es6-templates'); | ||
* usable in today's runtime environments. Pass options to control which | ||
* features to include. | ||
* features to include. By default, all options are enabled. | ||
* | ||
* Options | ||
* | ||
* arrowFunction - Compile ES6 arrow functions into normal functions. Default: on. | ||
* class - Compile ES6 classes into ES5 constructors. Default: on. | ||
* generator - Compile generator functions into ES5. Default: on. | ||
* rest - Compile rest params into ES5. Default: on. | ||
* templates - Compile template strings into ES5. Default: on. | ||
* arrowFunction - Compile ES6 arrow functions into normal functions. | ||
* class - Compile ES6 classes into ES5 constructors. | ||
* defaultParams - Compile ES6 default parameters to ES5. | ||
* generator - Compile generator functions into ES5. | ||
* rest - Compile rest params into ES5. | ||
* templates - Compile template strings into ES5. | ||
* | ||
@@ -72,2 +74,6 @@ * @param {object} ast | ||
if (options.defaultParams !== false) { | ||
ast = es6defaultParams.transform(ast); | ||
} | ||
if (options.generator !== false) { | ||
@@ -74,0 +80,0 @@ ast = regenerator.transform(ast); |
{ | ||
"name": "esnext", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Transform next-generation JavaScript to today's JavaScript.", | ||
@@ -27,3 +27,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"es6-class": "^0.3.1", | ||
"es6-class": "^0.3.3", | ||
"es6-arrow-function": "^0.3.0", | ||
@@ -35,4 +35,5 @@ "regenerator": "^0.4.5", | ||
"es6-templates": "^0.0.2", | ||
"ast-types": "^0.3.23" | ||
"ast-types": "^0.3.23", | ||
"es6-default-params": "0.0.1" | ||
} | ||
} |
/* jshint esnext:true */ | ||
class Counter { | ||
constructor(count) { | ||
this.count = count || 0; | ||
constructor(count=0) { | ||
this.count = count; | ||
} | ||
@@ -7,0 +7,0 @@ |
11620
13
221
9
+ Addedes6-default-params@0.0.1
+ Addedes6-default-params@0.0.1(transitive)
Updatedes6-class@^0.3.3