Skip to content

Commit

Permalink
feat(option): exclude.from.spaFile.angular.files, set to true to excl…
Browse files Browse the repository at this point in the history
…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 fadbb16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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']
Expand Down
5 changes: 4 additions & 1 deletion src/config/configs/config-exclude.coffee
Expand Up @@ -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
# ===============
Expand Down Expand Up @@ -41,7 +44,7 @@ module.exports = (config, options) ->
scripts: []
styles: []
spaFile:
scripts: [angularBootstrap]
scripts: rbSpaScripts
styles: []
dist:
client: []
Expand Down
2 changes: 2 additions & 0 deletions src/config/options/option-exclude.coffee
Expand Up @@ -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
# ===================
Expand Down

0 comments on commit fadbb16

Please sign in to comment.