diff options
author | st782s <statta@research.att.com> | 2017-05-04 07:48:42 -0400 |
---|---|---|
committer | st782s <statta@research.att.com> | 2017-05-04 12:28:17 -0400 |
commit | b54df0ddd0c6a0372327c5aa3668e5a6458fcd64 (patch) | |
tree | e69cfa9b314a801bd187cf0145d1d4306436229c /ecomp-portal-FE/client/bower_components/lodash/lib/common/minify.js | |
parent | 39d1e62c84041831bfc52cca73b5ed5efaf57d27 (diff) |
[PORTAL-7] Rebase
This rebasing includes common libraries and common overlays projects
abstraction of components
Change-Id: I9a24a338665c7cd058978e8636bc412d9e2fdce8
Signed-off-by: st782s <statta@research.att.com>
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/lodash/lib/common/minify.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/lodash/lib/common/minify.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/ecomp-portal-FE/client/bower_components/lodash/lib/common/minify.js b/ecomp-portal-FE/client/bower_components/lodash/lib/common/minify.js deleted file mode 100644 index 7a0082d3..00000000 --- a/ecomp-portal-FE/client/bower_components/lodash/lib/common/minify.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -var _ = require('lodash'), - fs = require('fs-extra'), - uglify = require('uglify-js'); - -var uglifyOptions = require('./uglify.options'); - -/*----------------------------------------------------------------------------*/ - -/** - * Asynchronously minifies the file at `srcPath`, writes it to `destPath`, and - * invokes `callback` upon completion. The callback is invoked with one argument: - * (error). - * - * If unspecified, `destPath` is `srcPath` with an extension of `.min.js`. For - * example, a `srcPath` of `path/to/foo.js` would have a `destPath` of `path/to/foo.min.js`. - * - * @param {string} srcPath The path of the file to minify. - * @param {string} [destPath] The path to write the file to. - * @param {Function} callback The function invoked upon completion. - * @param {Object} [option] The UglifyJS options object. - */ -function minify(srcPath, destPath, callback, options) { - if (_.isFunction(destPath)) { - if (_.isObject(callback)) { - options = callback; - } - callback = destPath; - destPath = undefined; - } - if (!destPath) { - destPath = srcPath.replace(/(?=\.js$)/, '.min'); - } - var output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions)); - fs.writeFile(destPath, output.code, 'utf-8', callback); -} - -module.exports = minify; |