Skip to content

Commit

Permalink
fix(config): change config option name spaFile to spa
Browse files Browse the repository at this point in the history
  • Loading branch information
jyounce committed Jun 12, 2015
1 parent ece580a commit 0dbd5dc
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -68,8 +68,8 @@ gulp rapid-build:prod
# angular.version = (string) defaults to '1.x' = semver version required
# angular.templateCache.dev.enable = (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 '/'
# spaFile.title = (string) defaults to package.json name or 'Application'
# spaFile.description = (string) defaults to package.json description
# spa.title = (string) defaults to package.json name or 'Application' = html title tag value
# spa.description = (string) defaults to package.json description = html meta description tag value
# ===================================================================================================================================================================
```

Expand Down
2 changes: 1 addition & 1 deletion config.coffee
Expand Up @@ -13,7 +13,7 @@ module.exports = (rbDir, options) ->
config = require("#{config.req.config}/config-env") config
config = require("#{config.req.config}/config-rb") config, rbDir
config = require("#{config.req.config}/config-app") config, options
config = require("#{config.req.config}/config-spa-file") config, options
config = require("#{config.req.config}/config-spa") config, options
config = require("#{config.req.config}/config-file-names") config
config = require("#{config.req.config}/config-angular") config, options
config = require("#{config.req.config}/config-dist-and-src") config, options
Expand Down
14 changes: 7 additions & 7 deletions config/config-options.coffee
Expand Up @@ -21,8 +21,8 @@
# angular.moduleName = (string) application module name
# angular.templateCache.dev.enable = (boolean) defaults to false
# angular.templateCache.useAbsolutePaths = (boolean) defaults to false
# spaFile.title = (string) defaults to package.json name
# spaFile.description = (string) defaults to package.json description
# spa.title = (string) defaults to package.json name
# spa.description = (string) defaults to package.json description
# ===============================================================================================================================
module.exports = (config, options) ->
log = require "#{config.req.helpers}/log"
Expand Down Expand Up @@ -75,17 +75,17 @@ module.exports = (config, options) ->
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

formatSpaFileOptions = ->
options.spaFile = {} if not isType.object options.spaFile
options.spaFile.title = null if not isType.string options.spaFile.title
options.spaFile.description = null if not isType.string options.spaFile.description
formatSpaOptions = ->
options.spa = {} if not isType.object options.spa
options.spa.title = null if not isType.string options.spa.title
options.spa.description = null if not isType.string options.spa.description

formatOptions()
formatServerOptions()
formatPortOptions()
formatOrderOptions()
formatAngularOptions()
formatSpaFileOptions()
formatSpaOptions()

# logs
# ====
Expand Down
28 changes: 0 additions & 28 deletions config/config-spa-file.coffee

This file was deleted.

28 changes: 28 additions & 0 deletions config/config-spa.coffee
@@ -0,0 +1,28 @@
module.exports = (config, options) ->
log = require "#{config.req.helpers}/log"
test = require("#{config.req.helpers}/test")()
pkg = require "#{config.req.app}/package.json"

# init spa
# ========
spa = {}
spa.title = options.spa.title or pkg.name or 'Application'
spa.description = options.spa.description or pkg.description or null

# add spa to config
# =====================
config.spa = spa

# logs
# ====
# log.json spa, 'spa ='

# tests
# =====
test.log 'true', config.spa, 'add spa to config'

# return
# ======
config


4 changes: 2 additions & 2 deletions tasks/build/build-spa.coffee
Expand Up @@ -33,8 +33,8 @@ module.exports = (gulp, config) ->
scripts: files.scripts
styles: files.styles
moduleName: config.angular.moduleName
title: config.spaFile.title
description: config.spaFile.description
title: config.spa.title
description: config.spa.description

# register task
# =============
Expand Down

0 comments on commit 0dbd5dc

Please sign in to comment.