Skip to content

Commit

Permalink
Use ember-cli-babel for transpiration
Browse files Browse the repository at this point in the history
  • Loading branch information
cibernox authored and Marten Schilstra committed Jul 30, 2018
1 parent 52c7db0 commit 9d6db8a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 43 deletions.
36 changes: 0 additions & 36 deletions lib/get-babel-options.js

This file was deleted.

6 changes: 2 additions & 4 deletions lib/service-worker-builder.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
'use strict';

const Babel = require('broccoli-babel-transpiler');
const EntryPoint = require('./entry-point');
const Funnel = require('broccoli-funnel');
const Rollup = require('./rollup-with-dependencies');
const existsSync = require('exists-sync');
const getBabelOptions = require('./get-babel-options');
const mergeTrees = require('broccoli-merge-trees');
const path = require('path');
const rollupReplace = require('rollup-plugin-replace');
Expand Down Expand Up @@ -117,7 +115,7 @@ module.exports = class ServiceWorkerBuilder {
}

_babelTranspile(tree) {
let babelOptions = getBabelOptions(this.app.project);
return new Babel(tree, babelOptions);
let emberCliBabel = this.app.project.addons.filter((a) => a.name === 'ember-cli-babel')[0];
return emberCliBabel.transpileTree(tree, { 'ember-cli-babel': { compileModules: false } });
}
}
4 changes: 2 additions & 2 deletions node-tests/fixtures/simple-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"ember-ajax": "^2.4.1",
"ember-cli": "2.12.0",
"ember-cli-app-version": "^2.0.0",
"ember-cli-babel": "^5.1.7",
"ember-cli-babel": "^6.9.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.6",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^3.1.0",
"ember-cli-shims": "^1.0.2",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"service worker"
],
"dependencies": {
"broccoli-babel-transpiler": "^6.1.2",
"broccoli-file-creator": "^1.1.1",
"broccoli-funnel": "^1.0.3",
"broccoli-merge-trees": "1.1.1",
Expand Down

0 comments on commit 9d6db8a

Please sign in to comment.