From 318fba15d7fc1ed09cf823e099b08d54676d13c3 Mon Sep 17 00:00:00 2001 From: Mark Baxter Date: Thu, 11 Dec 2014 17:26:42 +0000 Subject: [PATCH] added deepExclude, generateSourceMaps options. --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 76c4107..8eacacf 100644 --- a/index.js +++ b/index.js @@ -16,6 +16,8 @@ var PLUGIN_NAME = 'gulp-durandaljs', baseDir: 'app', main: 'main.js', extraModules: [], + deepExclude: true, + generateSourceMaps: true, durandalDynamicModules: true, verbose : false, output: undefined, @@ -91,7 +93,7 @@ module.exports = function gulpDurandaljs(userOptions){ _.flatten([scannedModules.js, options.extraModules || [], dynamicModules, scannedModules.plugged]) .map(fixSlashes), include = _.filter(modules, options.moduleFilter), - exclude = _.reject(modules, options.moduleFilter); + exclude = options.deepExclude ? _.reject(modules, options.moduleFilter) : []; return { include:_.unique(include), exclude:_.unique(exclude) }; })(), @@ -141,7 +143,7 @@ module.exports = function gulpDurandaljs(userOptions){ out: rjsCb, optimize: options.minify ? 'uglify2' : 'none', preserveLicenseComments: !options.minify, - generateSourceMaps : true, + generateSourceMaps : options.generateSourceMaps, insertRequire : insertRequireModules, wrap: almondWrapper };