diff --git a/lib/angular-app.js b/lib/angular-app.js index b0f8158..83d073f 100644 --- a/lib/angular-app.js +++ b/lib/angular-app.js @@ -23,14 +23,14 @@ var Funnel = require('broccoli-funnel'), module.exports = AngularApp; function AngularApp (options) { - this.vendorScripts = []; - this.vendorStyles = []; - this.options = AngularApp.initOptions(options); - this.env = AngularApp.env(); - this.isTesting = AngularApp.isTesting(); - this.isServing = AngularApp.isServing(); - this.isProduction = this.env === 'production'; - this.containerConfig = configLoader(this.env, true); + this.vendorScripts = []; + this.vendorStyles = []; + this.options = AngularApp.initOptions(options); + this.env = AngularApp.env(); + this.isTesting = AngularApp.isTesting(); + this.isServing = AngularApp.isServing(); + this.isProduction = this.env === 'production'; + this.appConfig = configLoader(this.env, true); } AngularApp.env = function () { @@ -73,15 +73,11 @@ AngularApp.prototype.appScriptTree = function () { include: ['**/*.js'], destDir: 'app' }), - bootstrapper = new Funnel('node_modules/angular-app', { - include: ['bootstrapper.js'], - destDir: 'app' - }), addons = new Funnel(this.addonsTree(), { include: ['**/*.module.js'] }); - return mergeTrees([app, addons, bootstrapper]); + return mergeTrees([app, addons]); }; AngularApp.prototype.templateTree = function () { @@ -249,8 +245,8 @@ AngularApp.prototype.runTests = function (appScriptsTree, vendorScriptsTree, lin tests = replace(tests, { files: [ '**/*.js' ], pattern: { - match: /@@CONTAINER_CONFIG/g, - replacement: this.containerConfig + match: /@@APP_CONFIG/g, + replacement: this.appConfig } }); @@ -259,7 +255,6 @@ AngularApp.prototype.runTests = function (appScriptsTree, vendorScriptsTree, lin autoWatch : this.isServing, configFile : process.cwd() + '/karma.conf.js', files : [ 'scripts/vendor.js', 'tests/angular-mocks.js', 'tests/helpers/**/*.js', '**/*.js' ], - exclude : [ 'app/bootstrapper.js' ], }); return [ lintingResults, unitTestingResults ]; @@ -285,8 +280,8 @@ AngularApp.prototype.toTree = function () { appScripts = replace(appScripts, { files: [ 'app/app.js' ], pattern: { - match: /@@CONTAINER_CONFIG/g, - replacement: this.containerConfig + match: /@@APP_CONFIG/g, + replacement: this.appConfig } }); appScripts = new Babel(appScripts, { @@ -302,8 +297,8 @@ AngularApp.prototype.toTree = function () { appScripts = concat(appScripts, { inputFiles : [ 'addons/**/*.js', 'app/**/*.js' ], - footerFiles : [ 'scripts/templates.js', 'app/bootstrapper.js'], - footer : 'require("app/bootstrapper")["default"];', + footerFiles : [ 'scripts/templates.js' ], + footer : 'require("app/app");', outputFile : 'scripts/app.js' }); diff --git a/package.json b/package.json index b0f5837..0a42fd7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-bro-app", - "version": "0.3.0", + "version": "0.3.1", "description": "Angular broccoli plugin and compilation routine", "main": "lib/angular-app.js", "scripts": {