Skip to content
Permalink
Browse files

refactor(build option): change build option minify.css.splitMinFile d…

…efault value to false

BREAKING CHANGE:
Only applies to people who need to support ie 8 and 9.
The build will no longer by default split styles.min.css into multiple files if the selector count > 4,095.

If you need this feature set the following in your rapid-build.json:
minify.css.splitMinFile = true
  • Loading branch information
jyounce committed Nov 22, 2017
1 parent 7dc4cf4 commit 82ebb10fd30eafba38a64bc7bdbbb76968255022
Showing with 5 additions and 6 deletions.
  1. +1 −1 README.md
  2. +4 −5 src/config/configs/config-minify.coffee
@@ -216,7 +216,7 @@ Below are a list of options you can use to customize your builds (place in rapid
# spa[scripts|styles].attrs = (object) = set to add additional attributes to the link (styles) and script tags that the build outputs in spa.html or modify the default attributes: scripts = { src }, styles = { rel, href }
# minify.css.styles = (boolean) defaults to true = for prod build, minify the css
# minify.css.fileName = (string) defaults to 'styles.min.css'
# minify.css.splitMinFile = (boolean) defaults to true = for prod build, task for ie9 and below, split styles.min.css into multiple files if selector count > 4,095
# minify.css.splitMinFile = (boolean) defaults to false = for prod build, task for ie9 and below, split styles.min.css into multiple files if selector count > 4,095
# minify.html.views = (boolean) defaults to true = for prod build, minify the html
# minify.html.templateCache = (boolean) defaults to true = for prod build, use the template cache
# minify.html.options = (object) defaults to { collapseWhitespace: true, removeComments: true, removeEmptyElements: false, removeEmptyAttributes: false } for details see: https://git.io/vVyAC
@@ -5,9 +5,9 @@ module.exports = (config, options) ->

# helpers
# =======
getOption = (type, opt) ->
getOption = (type, opt, defaultVal = true) ->
opt = options.minify[type][opt]
return true if isType.null opt
return defaultVal if isType.null opt
opt

getFileName = (type, lang) ->
@@ -23,7 +23,7 @@ module.exports = (config, options) ->
minify =
css:
styles: getOption 'css', 'styles'
splitMinFile: getOption 'css', 'splitMinFile'
splitMinFile: getOption 'css', 'splitMinFile', false
fileName: getFileName 'styles', 'css'
js:
scripts: getOption 'js', 'scripts'
@@ -58,8 +58,7 @@ module.exports = (config, options) ->
# cache bust
# ==========
cacheBustOpt = options.minify.cacheBust
minify.cacheBust =
if isType.null cacheBustOpt then true else cacheBustOpt
minify.cacheBust = if isType.null cacheBustOpt then true else cacheBustOpt

# add minify to config
# ====================

0 comments on commit 82ebb10

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