Skip to content
Permalink
Browse files

fix(config): change config option name spaFile to spa

  • Loading branch information
jyounce committed Jun 12, 2015
1 parent ece580a commit 0dbd5dcaa1d6112a899462204c46032500640e4e
Showing with 40 additions and 40 deletions.
  1. +2 −2 README.md
  2. +1 −1 config.coffee
  3. +7 −7 config/config-options.coffee
  4. +0 −28 config/config-spa-file.coffee
  5. +28 −0 config/config-spa.coffee
  6. +2 −2 tasks/build/build-spa.coffee
@@ -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
# ===================================================================================================================================================================
```

@@ -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
@@ -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"
@@ -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
# ====

This file was deleted.

@@ -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


@@ -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
# =============

0 comments on commit 0dbd5dc

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