From a90c9d4534d2823bcee76a9a8fca956137eeebc4 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Sun, 13 Sep 2015 21:29:47 -0700 Subject: [PATCH 1/2] Add ability to specify srcDir and destDir as configuration options. --- README.md | 4 +++- lib/bless-css.js | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a08ad0d..a36d4a5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ var app = new EmberApp({ cacheBuster: true, compress: false, force: false, - imports: true + imports: true, + srcDir: 'assets/', + destDir: 'assets/' // log: true } }); ``` diff --git a/lib/bless-css.js b/lib/bless-css.js index b84d708..98b5be8 100644 --- a/lib/bless-css.js +++ b/lib/bless-css.js @@ -5,11 +5,13 @@ var mergeTrees = require('broccoli-merge-trees'); module.exports = function(tree, options) { var files = options.files || ['**/*.css']; + var srcDir = options.srcDir || 'assets/'; + var destDir = options.destDir || 'assets/'; var styles = pickFiles(tree, { - srcDir: 'assets/', + srcDir: srcDir, files: files, - destDir: 'assets/' + destDir: destDir }); return mergeTrees([tree, bless(styles, options)], { overwrite: true }); From 854e029fb9e842c76996cfd3516e9639b249d7d5 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Sun, 13 Sep 2015 21:31:09 -0700 Subject: [PATCH 2/2] Upgrade to ember-cli v1.13.8 --- Brocfile.js | 30 ------------------------------ ember-cli-build.js | 32 ++++++++++++++++++++++++++++++++ package.json | 6 +++--- 3 files changed, 35 insertions(+), 33 deletions(-) delete mode 100644 Brocfile.js create mode 100644 ember-cli-build.js diff --git a/Brocfile.js b/Brocfile.js deleted file mode 100644 index d396660..0000000 --- a/Brocfile.js +++ /dev/null @@ -1,30 +0,0 @@ -/* jshint node: true */ -/* global require, module */ - -var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); - -var app = new EmberAddon({ - bless: { - enabled: true, - cacheBuster: true, - compress: false, - force: false, - imports: true - // log: true - } -}); - -// Use `app.import` to add additional libraries to the generated -// output files. -// -// If you need to use different assets in different -// environments, specify an object as the first parameter. That -// object's keys should be the environment name and the values -// should be the asset to use in that environment. -// -// If the library that you are including contains AMD or ES6 -// modules that you would like to import into your application -// please specify an object with the list of modules as keys -// along with the exports of each module as its value. - -module.exports = app.toTree(); diff --git a/ember-cli-build.js b/ember-cli-build.js new file mode 100644 index 0000000..bcfffdd --- /dev/null +++ b/ember-cli-build.js @@ -0,0 +1,32 @@ +/* jshint node: true */ +/* global require, module */ + +var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); + +module.exports = function(defaults) { + var app = new EmberAddon({ + bless: { + enabled: true, + cacheBuster: true, + compress: false, + force: false, + imports: true + // log: true + } + }); + + // Use `app.import` to add additional libraries to the generated + // output files. + // + // If you need to use different assets in different + // environments, specify an object as the first parameter. That + // object's keys should be the environment name and the values + // should be the asset to use in that environment. + // + // If the library that you are including contains AMD or ES6 + // modules that you would like to import into your application + // please specify an object with the list of modules as keys + // along with the exports of each module as its value. + + return app.toTree(); +} diff --git a/package.json b/package.json index 0269f7b..e88f6e9 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,10 @@ "author": "", "license": "MIT", "devDependencies": { - "broccoli-asset-rev": "^2.0.2", + "broccoli-asset-rev": "^2.1.2", "chai": "^1.9.1", - "ember-cli": "0.2.3", - "ember-cli-dependency-checker": "0.0.8", + "ember-cli": "1.13.8", + "ember-cli-dependency-checker": "1.0.1", "glob": "^5.0.3", "lodash": "^3.6.0", "mocha": "^1.18.0",