Skip to content
Permalink
Browse files

fix(option): change option angular.templateCache.dev.enable to angula…

…r.templateCache.dev
  • Loading branch information
jyounce committed Jun 29, 2015
1 parent a959e8a commit dd7a7f8a06c19066046b25e86d1b9faee3686f5b
Showing with 6 additions and 8 deletions.
  1. +1 −1 README.md
  2. +1 −2 config/config-angular.coffee
  3. +2 −3 config/config-options.coffee
  4. +1 −1 tasks/copy/copy-views.coffee
  5. +1 −1 tasks/watch/watch.coffee
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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'
@@ -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

0 comments on commit dd7a7f8

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