Skip to content
Open
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
30 changes: 24 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
'use strict';
var path = require('path');
var Funnel = require('broccoli-funnel');
var mergeTrees = require('broccoli-merge-trees');
var map = require('broccoli-stew').map;

module.exports = {
name: 'ember-colpick',
blueprintsPath: function() {
return path.join(__dirname, 'blueprints');
},
included: function colpick_included(app) {
this._super.included.apply(this, arguments);
if(!process.env.EMBER_CLI_FASTBOOT) {
var colpickPath = path.join(app.bowerDirectory, 'colpick');
treeForVendor: function(defaultTree) {
var trees = [];

this.app.import(path.join(colpickPath, 'js', 'colpick.js'));
this.app.import(path.join(colpickPath, 'css', 'colpick.css'));
if (defaultTree) {
trees.push(defaultTree);
}

var browserVendorLib = new Funnel(path.join(this.app.bowerDirectory, 'colpick', 'js'), {
files: ['colpick.js'],
destDir: 'colpick'
});

browserVendorLib = map(browserVendorLib, function(content) {
return "if (typeof FastBoot === 'undefined') { " + content + " }";
});

trees.push(browserVendorLib);
return new mergeTrees(trees);
},
included: function colpick_included(app) {
this._super.included.apply(this, arguments);
this.app.import(path.join('vendor', 'colpick', 'colpick.js'));
this.app.import(path.join(app.bowerDirectory, 'colpick', 'css', 'colpick.css'));
}
};
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.4.2",
"broccoli-funnel": "1.2.0",
"broccoli-merge-trees": "^2.0.0",
"broccoli-stew": "1.5.0",
"ember-cli": "2.4.3",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.2.0",
Expand Down