Skip to content
Permalink
Browse files

feat(minify build options): add new build options to minify[client|se…

…rver]

Before the minify.js build options only applied to client.
Now you can target either client or server and minify ES6+ (minifying ES6+ must be enabled).

New build options:
• minify.server.json.enable
• minify.client.js.fileName
• minify[client|server].js.enable
• minify[client|server].js.es6 (you can now minify ES6+)
• minify[client|server].js.options

BREAKING CHANGE:
All apply to rapid-build.json, -> means changed to:
• minify.js.scripts  -> minify.client.js.enable
• minify.js.fileName -> minify.client.js.fileName
• minify.js.mangle   -> minify.client.js.options = { mangle: false }

To migrate the code follow the example below (for rapid-build.json):

Before:
{
  minify: {
    js: {
      scripts: false,
      mangle : false,
      fileName: 'rapid-build.min.js'
    }
  }
}

Now:
{
  minify: {
    client: {
      js: {
        enable: false,
        options: { mangle: false },
        fileName: 'rapid-build.min.js'
      }
    }
  }
}
  • Loading branch information
jyounce committed Nov 28, 2017
1 parent a63dc72 commit d8f281772c8202aa5c12ad737fe4d70372ecddce
@@ -214,17 +214,19 @@ Below are a list of options you can use to customize your builds (place in rapid
# spa.dist.fileName = (string) defaults to file name of spa.src.filePath or 'spa.html' = provide if you want the dist spa file to be named differently, example: 'index.html'
# spa.placeholders = (array of strings) = set to retain spa file placeholders, optional values are: ['clickjacking', 'description', 'moduleName', 'ngCloakStyles', 'scripts', 'styles', 'title'] or ['all']
# 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.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
# minify.css.styles = (boolean) defaults to true = for prod build, minify the css
# minify.css.fileName = (string) defaults to 'styles.min.css'
# minify.css.fileName = (string) defaults to 'styles.min.css' = provide to name the minified css file differently
# 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
# minify.js.scripts = (boolean) defaults to true = for prod build, minify the js
# minify.js.fileName = (string) defaults to 'scripts.min.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
# minify.server.json.enable = (boolean) defaults to true = set to false to not minify your server json files
# minify.client.js.fileName = (string) defaults to 'scripts.min.js' = provide to name the minified js file differently
# minify[client|server].js.enable = (boolean) defaults to true = set to false to not minify your js client and or server files
# minify[client|server].js.es6 = (boolean) defaults to false = set to true if your js files are written in ES6+
# minify[client|server].js.options = (object) default minifier is ES5 = set to configure the minifier, find available options here: ES5 (https://git.io/vFbk9) or ES6+ (https://git.io/vFbkj)
# exclude.spa = (boolean) defaults to false = set to true to exclude spa.html from client dist
# exclude.angular.files = (boolean) defaults to false = set to true to exclude the angular files that come with rapid-build from dist (lib and modules)
# exclude.angular.modules = (boolean) defaults to false = set to true to exclude injecting the angular modules that come with rapid-build ['ngResource', 'ngRoute', 'ngSanitize']

0 comments on commit d8f2817

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