diff --git a/README.md b/README.md index b7b6a50..a5f2491 100644 --- a/README.md +++ b/README.md @@ -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 # =================================================================================================================================================================== ``` diff --git a/config.coffee b/config.coffee index 6a09f29..3df2479 100644 --- a/config.coffee +++ b/config.coffee @@ -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 diff --git a/config/config-options.coffee b/config/config-options.coffee index e98d1d8..1f9bf4f 100644 --- a/config/config-options.coffee +++ b/config/config-options.coffee @@ -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 # ==== diff --git a/config/config-spa-file.coffee b/config/config-spa-file.coffee deleted file mode 100644 index 8012e8e..0000000 --- a/config/config-spa-file.coffee +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = (config, options) -> - log = require "#{config.req.helpers}/log" - test = require("#{config.req.helpers}/test")() - pkg = require "#{config.req.app}/package.json" - - # init spaFile - # ============ - spaFile = {} - spaFile.title = options.spaFile.title or pkg.name or 'Application' - spaFile.description = options.spaFile.description or pkg.description or null - - # add spaFile to config - # ===================== - config.spaFile = spaFile - - # logs - # ==== - # log.json spaFile, 'spaFile =' - - # tests - # ===== - test.log 'true', config.spaFile, 'add spaFile to config' - - # return - # ====== - config - - diff --git a/config/config-spa.coffee b/config/config-spa.coffee new file mode 100644 index 0000000..89f8195 --- /dev/null +++ b/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 + + diff --git a/tasks/build/build-spa.coffee b/tasks/build/build-spa.coffee index 7b7b092..1ea30ed 100644 --- a/tasks/build/build-spa.coffee +++ b/tasks/build/build-spa.coffee @@ -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 # =============