diff --git a/Brocfile.js b/Brocfile.js old mode 100644 new mode 100755 index e3c443f..b88ddd4 --- a/Brocfile.js +++ b/Brocfile.js @@ -1,11 +1,11 @@ /* jshint node: true */ /* global require, module */ -var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'), - isProduction = ( process.env.EMBER_ENV || 'development' ) === 'production'; - -app = new EmberAddon(); - +var EmberAddon = require( 'ember-cli/lib/broccoli/ember-addon' ), + replace = require( 'broccoli-string-replace' ), + isProduction = ( process.env.EMBER_ENV || 'development' ) === 'production', + app = new EmberAddon(), + tree; // Use `app.import` to add additional libraries to the generated // output files. @@ -26,4 +26,18 @@ if ( !isProduction ) { app.import( app.bowerDirectory + '/sinon-qunit/lib/sinon-qunit.js', { type: 'test' } ); } -module.exports = app.toTree(); \ No newline at end of file +tree = replace( app.toTree(), { + files: [ 'index.html' ], + patterns: [ + { + match: /REPLACE_META_DESCRIPTION/g, + replacement: require('./package.json')['description'] + }, + { + match: /REPLACE_META_KEYWORDS/g, + replacement: require('./package.json')['keywords'].join( ', ' ) + ', ember, ember cli' + } + ] +}); + +module.exports = tree; \ No newline at end of file diff --git a/package.json b/package.json index 1d1b351..8542a04 100755 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "express": "^4.8.5", "glob": "^4.0.5", "morgan": "^1.5.0", - "ember-cli-es5-shim": "~0.1.0" + "ember-cli-es5-shim": "~0.1.0", + "broccoli-string-replace": "0.0.2" }, "ember-addon": { "configPath": "tests/dummy/config" diff --git a/tests/dummy/app/index.html b/tests/dummy/app/index.html index dc8854f..141f6e6 100755 --- a/tests/dummy/app/index.html +++ b/tests/dummy/app/index.html @@ -5,8 +5,8 @@ sl-ember-store Demo Application and Documentation - - + + {{content-for 'head'}}