diff options
author | 2017-05-04 07:48:42 -0400 | |
---|---|---|
committer | 2017-05-04 12:28:17 -0400 | |
commit | b54df0ddd0c6a0372327c5aa3668e5a6458fcd64 (patch) | |
tree | e69cfa9b314a801bd187cf0145d1d4306436229c /ecomp-portal-FE/client/bower_components/lodash/lib/common/file.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/file.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/lodash/lib/common/file.js | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/ecomp-portal-FE/client/bower_components/lodash/lib/common/file.js b/ecomp-portal-FE/client/bower_components/lodash/lib/common/file.js deleted file mode 100644 index 9f9016fb..00000000 --- a/ecomp-portal-FE/client/bower_components/lodash/lib/common/file.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -var _ = require('lodash'), - fs = require('fs-extra'), - glob = require('glob'), - path = require('path'); - -var minify = require('../common/minify.js'); - -/*----------------------------------------------------------------------------*/ - -/** - * Creates a [fs.copy](https://github.com/jprichardson/node-fs-extra#copy) - * function with `srcPath` and `destPath` partially applied. - * - * @memberOf file - * @param {string} srcPath The path of the file to copy. - * @param {string} destPath The path to copy the file to. - * @returns {Function} Returns the partially applied function. - */ -function copy(srcPath, destPath) { - return _.partial(fs.copy, srcPath, destPath); -} - -/** - * Creates an object of compiled template and base name pairs that match `pattern`. - * - * @memberOf file - * @param {string} pattern The glob pattern to be match. - * @returns {Object} Returns the object of compiled templates. - */ -function globTemplate(pattern) { - return _.transform(glob.sync(pattern), function(result, filePath) { - var key = path.basename(filePath, path.extname(filePath)); - result[key] = _.template(fs.readFileSync(filePath, 'utf8')); - }, {}); -} - -/** - * Creates a `minify` function with `srcPath` and `destPath` partially applied. - * - * @memberOf file - * @param {string} srcPath The path of the file to minify. - * @param {string} destPath The path to write the file to. - * @returns {Function} Returns the partially applied function. - */ -function min(srcPath, destPath) { - return _.partial(minify, srcPath, destPath); -} - -/** - * Creates a [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) - * function with `filePath` and `data` partially applied. - * - * @memberOf file - * @param {string} destPath The path to write the file to. - * @param {string} data The data to write to the file. - * @returns {Function} Returns the partially applied function. - */ -function write(destPath, data) { - return _.partial(fs.writeFile, destPath, data); -} - -/*----------------------------------------------------------------------------*/ - -module.exports = { - 'copy': copy, - 'globTemplate': globTemplate, - 'min': min, - 'write': write -}; |