Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX beta] Make the ember-source build work. #14658

Merged
merged 1 commit into from
Nov 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'));
}
Copy link
Contributor

@chadhietala chadhietala Nov 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to do a finally here and to make sure we have a jqueryPath and if not throw?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't have a jqueryPath at this point something else is going to have resulted in this breaking long before we got this far. The one in the catch statement is depended upon by ember-source itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SG


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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already in dependencies.

"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