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

Commit

Permalink
Make QUnit an NPM dep.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Dec 13, 2015
1 parent 46db807 commit 958e8b3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
1 change: 0 additions & 1 deletion blueprints/ember-cli-qunit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = {

afterInstall: function() {
return this.addBowerPackagesToProject([
{ name: 'qunit', target: '~1.20.0' },
{ name: 'ember-cli-test-loader', target: '0.2.1' },
{ name: 'ember-qunit-notifications', target: '0.1.0' }
]);
Expand Down
19 changes: 14 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ module.exports = {
},

treeForVendor: function(tree) {
var qunitPath = path.join(path.dirname(resolve.sync('qunitjs')), '..');

var trees = [
tree,
this.treeGenerator(qunitPath)

This comment has been minimized.

Copy link
@Turbo87

Turbo87 Aug 14, 2016

Member

@rwjblue @stefanpenner isn't this creating a WatchedDir of the entire node_modules folder? am I missing something here?

This comment has been minimized.

Copy link
@stefanpenner

stefanpenner Aug 14, 2016

Contributor

It happens to not currently: https://github.com/jquery/qunit/blob/master/package.json#L72 but if main changes it would. We will do need this as a broccoli primitive soon.

];

if (this._shouldImportEmberQUnit) {
// support for Ember CLI < 2.2.0-beta.1
var depTree = new MergeTrees(this._getDependencyTrees());
Expand All @@ -84,10 +91,12 @@ module.exports = {
annotation: 'Concat: Ember QUnit'
});

return new MergeTrees([concattedTree, tree]);
} else {
return tree;
trees.push(concattedTree);
}

return new MergeTrees(trees, {
annotation: 'ember-cli-qunit: treeForVendor'
});
},

included: function included(app, parentAddon) {
Expand All @@ -102,8 +111,8 @@ module.exports = {

if (app.tests) {
var fileAssets = [
app.bowerDirectory + '/qunit/qunit/qunit.js',
app.bowerDirectory + '/qunit/qunit/qunit.css'
'vendor/qunit/qunit.js',
'vendor/qunit/qunit.css'
];

var imgAssets = [];
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"broccoli-sourcemap-concat": "^1.1.6",
"ember-cli-version-checker": "^1.1.4",
"ember-qunit": "^0.4.18",
"qunitjs": "^1.20.0",
"resolve": "^1.1.6"
},
"bundledDependencies": []
Expand Down

0 comments on commit 958e8b3

Please sign in to comment.