Skip to content
This repository was archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
remove "no use strict" step
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Mar 1, 2017
1 parent 5c7a32a commit eeec269
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 95 deletions.
62 changes: 0 additions & 62 deletions lib/utils/conditional-use-strict-babel-plugin.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/utils/transpile-es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var Babel = require('broccoli-babel-transpiler');
var assign = require('lodash/object/assign');
var config = require('../config/build-config');
var conditionalUseStrict = require('./conditional-use-strict-babel-plugin');
var enifedFormatter = require('./babel-enifed-module-formatter');
var stripClassCallCheck = require('./babel-strip-class-call-check');
var resolveModules = require('amd-name-resolver').resolveModules;
Expand Down Expand Up @@ -51,7 +50,6 @@ module.exports = function(tree, description, _options) {
options.plugins = options.plugins.slice();
}

options.plugins.push(conditionalUseStrict);
if (options.avoidDefine) {
options.plugins.push({ transformer: enifedFormatter, position: 'after' });
}
Expand Down
31 changes: 0 additions & 31 deletions tests/utils/transpile-es6-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,35 +47,4 @@ describe('transpileES6', function() {
.to.equal(file(transpileExpected + '/classes/some-file.js').content.trim());
});
});

describe('`conditional-use-strict` plugin', function() {
var results;

beforeEach(function() {
var strictDirectiveFixture = path.join(transpileFixtures, 'conditional-use-strict');

var tree = transpileES6(strictDirectiveFixture);

builder = new broccoli.Builder(tree);

return builder.build().then(function(r) {
results = r;
});
});

it('adds `use strict` if it is not present', function() {
expect(file(results.directory + '/without-directive.js'))
.to.equal(file(transpileExpected + '/conditional-use-strict/without-directive.js').content.trim());
});

it('keeps `no use strict` if it is present', function() {
expect(file(results.directory + '/with-no-use-strict-directive.js'))
.to.equal(file(transpileExpected + '/conditional-use-strict/with-no-use-strict-directive.js').content.trim());
});

it('keeps `use strict` if it is present', function() {
expect(file(results.directory + '/with-use-strict-directive.js'))
.to.equal(file(transpileExpected + '/conditional-use-strict/with-use-strict-directive.js').content.trim());
});
});
});

0 comments on commit eeec269

Please sign in to comment.