Skip to content

Commit

Permalink
Add option to preserve original split files in addition to concatenating
Browse files Browse the repository at this point in the history
  • Loading branch information
jschiq2 committed Feb 28, 2015
1 parent 2795df6 commit 7450ab3
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,15 @@ module.exports = {

wrapScriptsInFunction: true,

/**
Whether or not to original files regardless of concatenation.
@property preserveOriginals
@type Boolean
@default true
*/

preserveOriginals: false,
/**
Append `<link>` and `<script>` tags to the app's HTML file to load only the assets we require.
Expand Down Expand Up @@ -378,10 +387,11 @@ module.exports = {
var workingTree = mergeTrees([tree, concatenatedScripts, concatenatedStyles]);

/* Remove the unnecessary files */

workingTree = fileRemover(workingTree, {
files: scriptInputFiles.concat(styleInputFiles)
});
if (!this.preserveOriginals) {
workingTree = fileRemover(workingTree, {
files: scriptInputFiles.concat(styleInputFiles)
});
}

return workingTree;
}
Expand Down

0 comments on commit 7450ab3

Please sign in to comment.