Skip to content

Commit

Permalink
Update ember-cli to 2.3.0.
Browse files Browse the repository at this point in the history
Use `npm` instead of `bower` to import the library.
  • Loading branch information
btecu committed Feb 17, 2016
1 parent a04ec10 commit a5fd975
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 31 deletions.
2 changes: 1 addition & 1 deletion app/components/bs-datetimepicker.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from 'ember-cli-bootstrap-datetimepicker/components/bs-datetimepicker';
export { default } from 'ember-cli-bootstrap-datetimepicker/components/bs-datetimepicker';
12 changes: 7 additions & 5 deletions blueprints/ember-cli-bootstrap-datetimepicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ module.exports = {
normalizeEntityName: function() {},

afterInstall: function(options) {
var blueprint = this;

return blueprint.addAddonToProject('ember-cli-moment-shim', '0.6.2').then(function() {
return blueprint.addBowerPackageToProject('eonasdan-bootstrap-datetimepicker', '4.17.37');
});
/* Use custom build until official is published
https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1438
*/
return this.addPackagesToProject([
{ name: 'ember-cli-moment-shim', target: '1.0.0' },
{ name: 'eonasdan-bootstrap-datetimepicker-ie ', target: '4.17.42' }
]);
}
};
16 changes: 4 additions & 12 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
{
"name": "ember-cli-bootstrap-datetimepicker",
"dependencies": {
"ember": "1.13.11",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "0.2.1",
"ember-data": "1.13.15",
"ember-load-initializers": "0.1.7",
"ember-qunit": "0.4.16",
"ember-qunit-notifications": "0.1.0",
"ember-resolver": "~0.1.20",
"eonasdan-bootstrap-datetimepicker": "4.17.37",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.4.0",
"qunit": "~1.20.0"
"ember": "~2.3.1",
"ember-cli-shims": "0.1.0",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0"
}
}
26 changes: 23 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* jshint node: true */
'use strict';

var path = require('path');
const Funnel = require('broccoli-funnel');
const path = require('path');
const mergeTrees = require('broccoli-merge-trees');

module.exports = {
name: 'ember-cli-bootstrap-datetimepicker',
Expand All @@ -10,7 +12,25 @@ module.exports = {
this._super.included(app);

// Import unminified css and js
app.import(path.join(app.bowerDirectory, '/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css'));
app.import(path.join(app.bowerDirectory , '/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js'));
let basePath = `${this.treePaths.vendor}/eonasdan-bootstrap-datetimepicker`;
app.import(`${basePath}/build/css/bootstrap-datetimepicker.css`);
app.import(`${basePath}/src/js/bootstrap-datetimepicker.js`);
},

treeForVendor: function(vendorTree) {
let trees = [];

if (vendorTree) {
trees.push(vendorTree);
}

let datetimepickerJs = require.resolve('eonasdan-bootstrap-datetimepicker');
let datetimepickerPath = path.join(path.dirname(datetimepickerJs), '../../');
trees.push(new Funnel(datetimepickerPath, {
destDir: 'eonasdan-bootstrap-datetimepicker',
include: ['build/css/bootstrap-datetimepicker.css', 'src/js/bootstrap-datetimepicker.js']
}));

return mergeTrees(trees);
}
};
25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,26 @@
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"ember-cli": "1.13.13",
"ember-ajax": "0.7.1",
"ember-cli": "2.3.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.1.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-ic-ajax": "0.2.4",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "^1.0.4",
"ember-cli-moment-shim": "0.6.2",
"ember-cli-qunit": "^1.2.1",
"ember-cli-moment-shim": "1.0.0",
"ember-cli-release": "0.2.8",
"ember-cli-sri": "^1.2.0",
"ember-cli-sri": "^2.0.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "1.13.15",
"ember-data": "^2.3.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-try": "~0.0.8"
"ember-load-initializers": "^0.5.0",
"ember-resolver": "^2.0.3",
"ember-try": "^0.1.2",
"eonasdan-bootstrap-datetimepicker": "4.17.37",
"loader.js": "^4.0.0"
},
"keywords": [
"ember-addon",
Expand All @@ -52,6 +55,8 @@
"datetimepicker"
],
"dependencies": {
"broccoli-funnel": "^1.0.1",
"broccoli-merge-trees": "^1.1.1",
"ember-cli-babel": "^5.1.5",
"ember-cli-htmlbars": "^1.0.1"
},
Expand Down

0 comments on commit a5fd975

Please sign in to comment.