Skip to content

Commit

Permalink
Make the build work.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond committed Nov 30, 2016
1 parent 7b42950 commit 1a95068
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
21 changes: 18 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* jshint node: true */
'use strict';
var stew = require('broccoli-stew');
var path = require('path');
var resolve = require('resolve');

var paths = {};
var absolutePaths = {};
Expand Down Expand Up @@ -32,6 +34,19 @@ module.exports = {
paths: paths,
absolutePaths: absolutePaths,
treeForVendor: function() {

var jqueryPath;
try {
jqueryPath = path.dirname(resolve.sync('jquery/package.json', { basedir: this.project.root }));
} catch (error) {
jqueryPath = path.dirname(require.resolve('jquery/package.json'));
}

var jquery = stew.find(jqueryPath + '/dist', {
destDir: 'ember/jquery',
files: [ 'jquery.js' ]
});

var ember = stew.find(__dirname + '/dist', {
destDir: 'ember',
files: [
Expand All @@ -40,8 +55,7 @@ module.exports = {
'ember-testing.js',
'ember.debug.js',
'ember.min.js',
'ember.prod.js',
'jquery/jquery.js'
'ember.prod.js'
]
});

Expand All @@ -52,7 +66,8 @@ module.exports = {

return stew.find([
ember,
shims
shims,
jquery
]);
}
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"broccoli-funnel": "^1.0.6",
"broccoli-merge-trees": "^1.1.4",
"broccoli-rollup": "^1.0.3",
"broccoli-stew": "^1.2.0",
"chalk": "^1.1.1",
"dag-map": "^2.0.1",
"ember-cli": "^2.6.1",
Expand All @@ -48,7 +47,6 @@
"glimmer-engine": "^0.19.2",
"glob": "^5.0.13",
"html-differ": "^1.3.4",
"jquery": "^3.1.1",
"mocha": "^2.4.5",
"qunit-extras": "^1.5.0",
"qunit-phantomjs-runner": "^2.2.0",
Expand All @@ -67,7 +65,9 @@
"ember-cli-string-utils": "^1.0.0",
"ember-cli-test-info": "^1.0.0",
"ember-cli-valid-component-name": "^1.0.0",
"jquery": "^3.1.1",
"rsvp": "^3.3.3",
"resolve": "^1.1.7",
"simple-dom": "^0.3.0"
},
"ember-addon": {
Expand Down

0 comments on commit 1a95068

Please sign in to comment.