Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Commit

Permalink
Merge branch 'fix-sourcemap-concat-loader'
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Sep 21, 2015
2 parents 4c630a4 + 80db025 commit 10b8561
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions lib/broccoli/amd-tree-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moduleRoot>/filename aka
// "content-kit-editor/filename"
// 'content-kit-editor/filename'
var tree = funnel(libDir, {
destDir: '/' + packageName
});
Expand All @@ -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
};

Expand All @@ -61,19 +64,20 @@ 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);',
'})();'
].join('\n');
}

tree = concat(tree, concatOptions);

return tree;
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "broccoli-multi-builder",
"version": "0.2.7",
"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",
Expand All @@ -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"
Expand Down

0 comments on commit 10b8561

Please sign in to comment.