Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Convert "mocha" from Bower to NPM dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Aug 14, 2016
1 parent f30f969 commit f8a1ea9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 0 additions & 1 deletion blueprints/ember-cli-mocha/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
var addonContext = this;

return this.addBowerPackagesToProject([
{ name: 'mocha', source: 'mocha', target: '~2.2.4' },
{ name: 'chai', source: 'chai', target: '~2.3.0' },
{ name: 'ember-mocha-adapter', source: 'ember-mocha-adapter', target: '~0.3.1' },
{ name: 'ember-cli-test-loader', source: 'ember-cli-test-loader', target: '0.2.2' }
Expand Down
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0",
"mocha": "~2.4.5",
"chai": "~2.3.0",
"ember-mocha-adapter": "~0.3.1"
}
Expand Down
12 changes: 10 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ module.exports = {
},

treeForVendor: function(tree) {
var mochaPath = path.dirname(resolve.sync('mocha'));
// var mochaTree = this.treeGenerator(mochaPath);
var mochaTree = new Funnel(mochaPath, {
files: ['mocha.js', 'mocha.css'],
destDir: '/mocha',
});

var emberMochaBuildSupportPath = path.join(this._emberMochaLibPath, '..', 'build-support');

var mochaSetupTree = new Funnel(emberMochaBuildSupportPath, {
Expand All @@ -105,6 +112,7 @@ module.exports = {

var trees = [
tree,
mochaTree,
mochaSetupTree
];

Expand Down Expand Up @@ -146,8 +154,8 @@ module.exports = {

if (app.tests) {
var fileAssets = [
app.bowerDirectory + '/mocha/mocha.js',
app.bowerDirectory + '/mocha/mocha.css',
'vendor/mocha/mocha.js',
'vendor/mocha/mocha.css',
app.bowerDirectory + '/chai/chai.js',
'vendor/ember-mocha/mocha-setup.js',
app.bowerDirectory + '/ember-mocha-adapter/adapter.js',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"ember-cli-version-checker": "^1.1.6",
"ember-mocha": "^0.8.11",
"exists-sync": "0.0.3",
"mocha": "^2.5.3",
"resolve": "^1.1.7"
}
}

0 comments on commit f8a1ea9

Please sign in to comment.