Skip to content
Permalink
Browse files

feat(option): exclude.from.spaFile.angular.files, set to true to excl…

…ude the angular files from spa.html the build includes

This includes: angular library and modules ngResource, ngRoute and ngSanitize.
  • Loading branch information
jyounce committed Jun 13, 2016
1 parent 4dd784e commit fadbb162fab31096aac151d424245aec1b95e53c
Showing with 7 additions and 1 deletion.
  1. +1 −0 README.md
  2. +4 −1 src/config/configs/config-exclude.coffee
  3. +2 −0 src/config/options/option-exclude.coffee
@@ -185,6 +185,7 @@ package.json
# exclude.from.cacheBust = (array of strings) = file paths: exclude files from the cache bust
# exclude.from.minFile[scripts|styles] = (array of strings) = file paths: exclude script or style files from automatically being generated in the scripts.min.js or styles.min.css file
# exclude.from.spaFile[scripts|styles] = (array of strings) = file paths: exclude script or style files from automatically being generated in the spa.html file
# exclude.from.spaFile.angular.files = (boolean) defaults to false = set to true to exclude the angular files from spa.html the build includes (angular library and modules ngResource, ngRoute and ngSanitize)
# exclude.from.dist[client|server] = (array of strings) = file paths: exclude client or server files from the dist folder
# test.client.browsers = (array of browser names) = phantomjs will run by default, optional browser names are ['chrome', 'firefox', 'ie', 'safari']
# server.node_modules = (array of module names) = node_modules you would like to copy to the server dist, example: ['q']
@@ -7,7 +7,10 @@ module.exports = (config, options) ->

# exclude rb files
# ================
angularFiles = path.join 'bower_components', 'angular**'
angularBootstrap = path.join 'scripts', 'bootstrap.js'
rbSpaScripts = [ angularBootstrap ]
rbSpaScripts.unshift angularFiles if options.exclude.from.spaFile.angular.files is true

# options helpers
# ===============
@@ -41,7 +44,7 @@ module.exports = (config, options) ->
scripts: []
styles: []
spaFile:
scripts: [angularBootstrap]
scripts: rbSpaScripts
styles: []
dist:
client: []
@@ -25,6 +25,8 @@ module.exports = (config, options) ->
exclude.from.dist.server = null unless isType.array exclude.from.dist.server
exclude.default.client.files = null unless isType.boolean exclude.default.client.files
exclude.default.server.files = null unless isType.boolean exclude.default.server.files
exclude.from.spaFile.angular = {} unless isType.object exclude.from.spaFile.angular
exclude.from.spaFile.angular.files = null unless isType.boolean exclude.from.spaFile.angular.files

# add exclude options
# ===================

0 comments on commit fadbb16

Please sign in to comment.
You can’t perform that action at this time.