Skip to content
Permalink
Browse files

feat(option): add option minify.spa.file

  • Loading branch information
jyounce committed Jul 2, 2015
1 parent 9bbcbf2 commit 4b0e612804a0485a040849bc07b2c96983188e95
Showing with 10 additions and 2 deletions.
  1. +1 −0 README.md
  2. +2 −0 config/config-minify.coffee
  3. +3 −0 config/config-options.coffee
  4. +4 −2 tasks/minify/minify-spa.coffee
@@ -133,6 +133,7 @@ gulp rapid-build:prod
# minify.html.templateCache = (boolean) defaults to true = for prod build, use the template cache
# minify.js.scripts = (boolean) defaults to true = for prod build, minify the js
# minify.js.mangle = (boolean) defaults to true = for prod build, mangle the names in the js
# minify.spa.file = (boolean) defaults to true = for prod build, minify the spa.html file
# minify.cacheBust = (boolean) defaults to true = for prod build, ensures the user always receives the latest files, adds an md5 checksum to the client files before their extension
# ========================================================================================================================================================================================================================
```
@@ -24,6 +24,8 @@ module.exports = (config, options) ->
templateCache: getOption 'html', 'templateCache'
options: # not configurable
conditionals:true, empty:true, ssi:true
spa:
file: getOption 'spa', 'file'

# cache bust
# ==========
@@ -38,6 +38,7 @@
# minify.html.templateCache = (boolean) defaults to true
# minify.js.scripts = (boolean) defaults to true
# minify.js.mangle = (boolean) defaults to true
# minify.spa.file = (boolean) defaults to true
# minify.cacheBust = (boolean) defaults to true
# =========================================================================================================================================================================
module.exports = (config, options) ->
@@ -111,13 +112,15 @@ module.exports = (config, options) ->
options.minify.css = {} if not isType.object options.minify.css
options.minify.html = {} if not isType.object options.minify.html
options.minify.js = {} if not isType.object options.minify.js
options.minify.spa = {} if not isType.object options.minify.spa
options.minify.cacheBust = null if not isType.boolean options.minify.cacheBust
options.minify.css.styles = null if not isType.boolean options.minify.css.styles
options.minify.css.splitMinFile = null if not isType.boolean options.minify.css.splitMinFile
options.minify.html.views = null if not isType.boolean options.minify.html.views
options.minify.html.templateCache = null if not isType.boolean options.minify.html.templateCache
options.minify.js.scripts = null if not isType.boolean options.minify.js.scripts
options.minify.js.mangle = null if not isType.boolean options.minify.js.mangle
options.minify.spa.file = null if not isType.boolean options.minify.spa.file

# init
# ====
@@ -1,6 +1,7 @@
module.exports = (gulp, config) ->
q = require 'q'
minifyHtml = require 'gulp-minify-html'
q = require 'q'
minifyHtml = require 'gulp-minify-html'
promiseHelp = require "#{config.req.helpers}/promise"

# tasks
# =====
@@ -18,6 +19,7 @@ module.exports = (gulp, config) ->
# register task
# =============
gulp.task "#{config.rb.prefix.task}minify-spa", ->
return promiseHelp.get() if not config.minify.spa.file
runTask(
config.spa.dist.path
config.dist.app.client.dir

0 comments on commit 4b0e612

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