Skip to content

Commit

Permalink
chore: update from babel5 to babel6
Browse files Browse the repository at this point in the history
Upgrading to babel6 allows us to use the babel-plugin-debug-macros plugin in a future change.

Prep work for ember-cli#114
  • Loading branch information
Lenny Burdette committed Jun 23, 2017
1 parent 094e20b commit baf5893
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 19 deletions.
10 changes: 6 additions & 4 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
var babel = require('babel-core');
var transform = babel.transform;
var fs = require('fs');
var stripHeimdall = require('babel5-plugin-strip-heimdall');
var stripHeimdall = require('babel6-plugin-strip-heimdall');
var mkdirp = require('mkdirp').sync;

mkdirp('./dist/loader');
var source = fs.readFileSync('./lib/loader/loader.js', 'utf8');
var instrumented = transform(source, {
whitelist: ['es6.destructuring']
plugins: ['transform-es2015-destructuring']
}).code;

var stripped = transform(source, {
plugins: [stripHeimdall],
whitelist: ['es6.destructuring']
plugins: [
'transform-es2015-destructuring',
stripHeimdall
],
}).code;

fs.writeFileSync('./dist/loader/loader.instrument.js', instrumented);
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"dependencies": {},
"devDependencies": {
"ara": "0.0.3",
"babel-core": "^5.0.0",
"babel5-plugin-strip-heimdall": "^5.0.2",
"babel-core": "^6.25.0",
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
"babel6-plugin-strip-heimdall": "^6.0.1",
"heimdalljs": "^0.3.2",
"jscs": "^2.11.0",
"jshint": "^2.9.2",
Expand Down
Loading

0 comments on commit baf5893

Please sign in to comment.