From a68d5bcb57a63e447e46eba49401d7ad1cb305a6 Mon Sep 17 00:00:00 2001 From: Cory Forsyth Date: Mon, 21 Sep 2015 13:28:30 -0400 Subject: [PATCH 1/2] Fix issue with loader.js not being included Change pushing loader.js in `inputFiles` to `headerFiles`. See https://github.com/emberjs/emberjs-build/pull/126 for context. Upgrade to broccoli-sourcemap-concat 2.0.0 --- lib/broccoli/amd-tree-builder.js | 16 ++++++++++------ package.json | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/broccoli/amd-tree-builder.js b/lib/broccoli/amd-tree-builder.js index 45a4159..7000175 100644 --- a/lib/broccoli/amd-tree-builder.js +++ b/lib/broccoli/amd-tree-builder.js @@ -29,7 +29,7 @@ function treeBuilder(options) { // put in a destDir with the same package name as the name of the moduleRoot // that we want so that named modules become /filename aka - // "content-kit-editor/filename" + // 'content-kit-editor/filename' var tree = funnel(libDir, { destDir: '/' + packageName }); @@ -48,9 +48,12 @@ function treeBuilder(options) { }); var concatOptions = { - inputFiles: [ - '**/*.js' // from our transpiled js from src - ], + header: '', + headerFiles: [], + inputFiles: ['**/*.js'], + footerFiles: [], + footer: '', + outputFile: '/' + outputPath }; @@ -61,12 +64,12 @@ function treeBuilder(options) { tree = amdLoader(tree, { destDir: '/loader.js' }); - concatOptions.inputFiles.unshift('loader.js/loader.js'); + concatOptions.headerFiles.push('loader.js/loader.js'); } if (options.isGlobal) { var registerGlobal = options.registerGlobalExport; - concatOptions.header = ';(function() {\n'; + concatOptions.header = ';(function() {'; concatOptions.footer = [ 'require("' + packageName + '")["' + registerGlobal + '"](window, document);', '})();' @@ -74,6 +77,7 @@ function treeBuilder(options) { } tree = concat(tree, concatOptions); + return tree; } diff --git a/package.json b/package.json index 7942f9c..ae87c20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "broccoli-multi-builder", - "version": "0.2.7", + "version": "0.2.8-beta.2", "description": "write and consume es6 source code, build to amd, globals or commonjs", "main": "index.js", "repository": "https://github.com/bustlelabs/broccoli-multi-builder", @@ -19,7 +19,7 @@ "broccoli-babel-transpiler": "^5.2.3", "broccoli-funnel": "^0.2.3", "broccoli-merge-trees": "^0.2.1", - "broccoli-sourcemap-concat": "^1.0.2", + "broccoli-sourcemap-concat": "^2.0.0", "broccoli-stew": "^0.3.3", "exists-sync": "0.0.3", "lodash": "^3.10.0" From 80db02553528958d0f5f0accb63d9d7dfb6ac089 Mon Sep 17 00:00:00 2001 From: Cory Forsyth Date: Mon, 21 Sep 2015 14:06:20 -0400 Subject: [PATCH 2/2] 0.2.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae87c20..a62b4b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "broccoli-multi-builder", - "version": "0.2.8-beta.2", + "version": "0.2.8", "description": "write and consume es6 source code, build to amd, globals or commonjs", "main": "index.js", "repository": "https://github.com/bustlelabs/broccoli-multi-builder",