Skip to content

Commit

Permalink
fix(option): change option angular.templateCache.dev.enable to angula…
Browse files Browse the repository at this point in the history
…r.templateCache.dev
  • Loading branch information
jyounce committed Jun 29, 2015
1 parent a959e8a commit dd7a7f8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ gulp rapid-build:prod
# angular.httpBackend.dev = (boolean) defaults to false = set to true to enable httpBackend for dev and default build
# angular.httpBackend.prod = (boolean) defaults to false = set to true to enable httpBackend for prod build
# angular.httpBackend.dir = (string) defaults to 'mocks' = directory inside your client scripts directory
# angular.templateCache.dev.enable = (boolean) defaults to false = use template cache when running default and dev task
# angular.templateCache.dev = (boolean) defaults to false = use template cache when running default and dev task
# angular.templateCache.useAbsolutePaths = (boolean) defaults to false = prefix template urls with a '/'
# angular.exclude.files = (boolean) defaults to false = set to true to exclude angular files (lib and modules)
# spa.title = (string) defaults to package.json name or 'Application' = html title tag value
Expand Down
3 changes: 1 addition & 2 deletions config/config-angular.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ module.exports = (config, options) ->
# template cache
# ==============
angular.templateCache = {}
angular.templateCache.dev = {}
angular.templateCache.dev.enable = options.angular.templateCache.dev.enable or false
angular.templateCache.dev = options.angular.templateCache.dev or false
angular.templateCache.useAbsolutePaths = options.angular.templateCache.useAbsolutePaths or false

# rb bower dependencies
Expand Down
5 changes: 2 additions & 3 deletions config/config-options.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# angular.httpBackend.dev = (boolean) defaults to false
# angular.httpBackend.prod = (boolean) defaults to false
# angular.httpBackend.dir = (string) defaults to 'mocks'
# angular.templateCache.dev.enable = (boolean) defaults to false
# angular.templateCache.dev = (boolean) defaults to false
# angular.templateCache.useAbsolutePaths = (boolean) defaults to false
# angular.exclude.files = (boolean) defaults to false
# spa.title = (string) defaults to package.json name
Expand Down Expand Up @@ -85,9 +85,8 @@ module.exports = (config, options) ->
options.angular.httpBackend.prod = null if not isType.boolean options.angular.httpBackend.prod
options.angular.httpBackend.dir = null if not isType.string options.angular.httpBackend.dir
options.angular.templateCache = {} if not isType.object options.angular.templateCache
options.angular.templateCache.dev = null if not isType.boolean options.angular.templateCache.dev
options.angular.templateCache.useAbsolutePaths = null if not isType.boolean options.angular.templateCache.useAbsolutePaths
options.angular.templateCache.dev = {} if not isType.object options.angular.templateCache.dev
options.angular.templateCache.dev.enable = null if not isType.boolean options.angular.templateCache.dev.enable

spaOptions = ->
options.spa = {} if not isType.object options.spa
Expand Down
2 changes: 1 addition & 1 deletion tasks/copy/copy-views.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = (gulp, config) ->
task = 'template-cache'
else
task = 'copy-html'
else if config.angular.templateCache.dev.enable
else if config.angular.templateCache.dev
task = 'template-cache'
else
task = 'copy-html'
Expand Down
2 changes: 1 addition & 1 deletion tasks/watch/watch.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ module.exports = (gulp, config, browserSync) ->
# html watch (handle angular template cache)
# ==========================================
htmlWatch = ->
if config.angular.templateCache.dev.enable
if config.angular.templateCache.dev
createWatch glob.src.html, 'tCache',
lang:'html', srcType:'views', taskOnly:true, logTaskName:'template cache'
else
Expand Down

0 comments on commit dd7a7f8

Please sign in to comment.