copy-webpack-plugin
Advanced tools
Comparing version 4.6.0 to 5.0.0
@@ -5,2 +5,31 @@ # Change Log | ||
<a name="5.0.0"></a> | ||
# [5.0.0](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v4.6.0...v5.0.0) (2019-02-20) | ||
### Bug Fixes | ||
* copy only modified files when you use patterns with difference `to` and same `context` ([#341](https://github.com/webpack-contrib/copy-webpack-plugin/issues/341)) ([e808aa2](https://github.com/webpack-contrib/copy-webpack-plugin/commit/e808aa2)) | ||
* handle `[contenthash]` as template ([#328](https://github.com/webpack-contrib/copy-webpack-plugin/issues/328)) ([61dfe52](https://github.com/webpack-contrib/copy-webpack-plugin/commit/61dfe52)) | ||
* handles when you add new files in watch mode and use `glob` ([#333](https://github.com/webpack-contrib/copy-webpack-plugin/issues/333)) ([49a28f0](https://github.com/webpack-contrib/copy-webpack-plugin/commit/49a28f0)) | ||
* normalize path segment separation, no problems when you mixed `/` and `\\` ([#339](https://github.com/webpack-contrib/copy-webpack-plugin/issues/339)) ([8f5e638](https://github.com/webpack-contrib/copy-webpack-plugin/commit/8f5e638)) | ||
* throw error if `from` is an empty string [#278](https://github.com/webpack-contrib/copy-webpack-plugin/issues/278) ([#285](https://github.com/webpack-contrib/copy-webpack-plugin/issues/285)) ([adf1046](https://github.com/webpack-contrib/copy-webpack-plugin/commit/adf1046)) | ||
### Features | ||
* emit warning instead error if file doesn't exist ([#338](https://github.com/webpack-contrib/copy-webpack-plugin/issues/338)) ([a1c5372](https://github.com/webpack-contrib/copy-webpack-plugin/commit/a1c5372)) | ||
* supports copy nested directories/files in symlink ([#335](https://github.com/webpack-contrib/copy-webpack-plugin/issues/335)) ([f551c0d](https://github.com/webpack-contrib/copy-webpack-plugin/commit/f551c0d)) | ||
### BREAKING CHANGES | ||
* drop support for webpack < 4 | ||
* drop support for node < 6.9 | ||
* `debug` option was renamed to `logLevel`, it only accepts string values: `trace`, `debug`, `info`, `warn`, `error` and `silent` | ||
* plugin emit warning instead error if file doesn't exist | ||
* change `prototype` of plugin, now you can to get correct plugin name | ||
<a name="4.6.0"></a> | ||
@@ -7,0 +36,0 @@ # [4.6.0](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v4.5.4...v4.6.0) (2018-10-31) |
@@ -1,240 +0,123 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _path = require('path'); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _path2 = _interopRequireDefault(_path); | ||
var _path = _interopRequireDefault(require("path")); | ||
var _preProcessPattern = require('./preProcessPattern'); | ||
var _webpackLog = _interopRequireDefault(require("webpack-log")); | ||
var _preProcessPattern2 = _interopRequireDefault(_preProcessPattern); | ||
var _preProcessPattern = _interopRequireDefault(require("./preProcessPattern")); | ||
var _processPattern = require('./processPattern'); | ||
var _processPattern = _interopRequireDefault(require("./processPattern")); | ||
var _processPattern2 = _interopRequireDefault(_processPattern); | ||
var _postProcessPattern = _interopRequireDefault(require("./postProcessPattern")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function CopyWebpackPlugin() { | ||
var patterns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
class CopyPlugin { | ||
constructor(patterns = [], options = {}) { | ||
if (!Array.isArray(patterns)) { | ||
throw new Error('[copy-webpack-plugin] patterns must be an array'); | ||
throw new Error('[copy-webpack-plugin] patterns must be an array'); | ||
} | ||
// Defaults debug level to 'warning' | ||
options.debug = options.debug || 'warning'; | ||
this.patterns = patterns; | ||
this.options = options; | ||
} | ||
// Defaults debugging to info if only true is specified | ||
if (options.debug === true) { | ||
options.debug = 'info'; | ||
} | ||
apply(compiler) { | ||
const fileDependencies = new Set(); | ||
const contextDependencies = new Set(); | ||
const written = {}; | ||
let context; | ||
var debugLevels = ['warning', 'info', 'debug']; | ||
var debugLevelIndex = debugLevels.indexOf(options.debug); | ||
function log(msg, level) { | ||
if (level === 0) { | ||
msg = 'WARNING - ' + msg; | ||
} else { | ||
level = level || 1; | ||
} | ||
if (level <= debugLevelIndex) { | ||
console.log('[copy-webpack-plugin] ' + msg); // eslint-disable-line no-console | ||
} | ||
if (!this.options.context) { | ||
({ | ||
context | ||
} = compiler.options); | ||
} else if (!_path.default.isAbsolute(this.options.context)) { | ||
context = _path.default.join(compiler.options.context, this.options.context); | ||
} else { | ||
({ | ||
context | ||
} = this.options); | ||
} | ||
function warning(msg) { | ||
log(msg, 0); | ||
} | ||
const logger = (0, _webpackLog.default)({ | ||
name: 'copy-webpack-plugin', | ||
level: this.options.logLevel || 'warn' | ||
}); | ||
const plugin = { | ||
name: 'CopyPlugin' | ||
}; | ||
compiler.hooks.emit.tapAsync(plugin, (compilation, callback) => { | ||
logger.debug('starting emit'); | ||
const globalRef = { | ||
logger, | ||
compilation, | ||
written, | ||
fileDependencies, | ||
contextDependencies, | ||
context, | ||
inputFileSystem: compiler.inputFileSystem, | ||
output: compiler.options.output.path, | ||
ignore: this.options.ignore || [], | ||
copyUnmodified: this.options.copyUnmodified, | ||
concurrency: this.options.concurrency | ||
}; | ||
function info(msg) { | ||
log(msg, 1); | ||
} | ||
if (globalRef.output === '/' && compiler.options.devServer && compiler.options.devServer.outputPath) { | ||
globalRef.output = compiler.options.devServer.outputPath; | ||
} | ||
function debug(msg) { | ||
log(msg, 2); | ||
} | ||
const { | ||
patterns | ||
} = this; | ||
Promise.all(patterns.map(pattern => Promise.resolve().then(() => (0, _preProcessPattern.default)(globalRef, pattern)) // Every source (from) is assumed to exist here | ||
// eslint-disable-next-line no-shadow | ||
.then(pattern => (0, _processPattern.default)(globalRef, pattern).then(files => { | ||
if (!files) { | ||
return Promise.resolve(); | ||
} | ||
var apply = function apply(compiler) { | ||
var fileDependencies = void 0; | ||
var contextDependencies = void 0; | ||
var written = {}; | ||
return Promise.all(files.filter(Boolean).map(file => (0, _postProcessPattern.default)(globalRef, pattern, file))); | ||
})))).catch(error => { | ||
compilation.errors.push(error); | ||
}).then(() => { | ||
logger.debug('finishing emit'); | ||
callback(); | ||
}); | ||
}); | ||
compiler.hooks.afterEmit.tapAsync(plugin, (compilation, callback) => { | ||
logger.debug('starting after-emit'); // Add file dependencies if they're not already tracked | ||
var context = void 0; | ||
if (!options.context) { | ||
context = compiler.options.context; | ||
} else if (!_path2.default.isAbsolute(options.context)) { | ||
context = _path2.default.join(compiler.options.context, options.context); | ||
for (const fileDependency of fileDependencies) { | ||
if (compilation.fileDependencies.has(fileDependency)) { | ||
logger.debug(`not adding '${fileDependency}' to change tracking, because it's already tracked`); | ||
} else { | ||
context = options.context; | ||
logger.debug(`adding '${fileDependency}' to change tracking`); | ||
compilation.fileDependencies.add(fileDependency); | ||
} | ||
} // Add context dependencies if they're not already tracked | ||
var emit = function emit(compilation, cb) { | ||
debug('starting emit'); | ||
var callback = function callback() { | ||
debug('finishing emit'); | ||
cb(); | ||
}; | ||
fileDependencies = []; | ||
contextDependencies = []; | ||
var globalRef = { | ||
info: info, | ||
debug: debug, | ||
warning: warning, | ||
compilation: compilation, | ||
written: written, | ||
fileDependencies: fileDependencies, | ||
contextDependencies: contextDependencies, | ||
context: context, | ||
inputFileSystem: compiler.inputFileSystem, | ||
output: compiler.options.output.path, | ||
ignore: options.ignore || [], | ||
copyUnmodified: options.copyUnmodified, | ||
concurrency: options.concurrency | ||
}; | ||
if (globalRef.output === '/' && compiler.options.devServer && compiler.options.devServer.outputPath) { | ||
globalRef.output = compiler.options.devServer.outputPath; | ||
} | ||
var tasks = []; | ||
patterns.forEach(function (pattern) { | ||
tasks.push(Promise.resolve().then(function () { | ||
return (0, _preProcessPattern2.default)(globalRef, pattern); | ||
}) | ||
// Every source (from) is assumed to exist here | ||
.then(function (pattern) { | ||
return (0, _processPattern2.default)(globalRef, pattern); | ||
})); | ||
}); | ||
Promise.all(tasks).catch(function (err) { | ||
compilation.errors.push(err); | ||
}).then(function () { | ||
return callback(); | ||
}); | ||
}; | ||
var afterEmit = function afterEmit(compilation, cb) { | ||
debug('starting after-emit'); | ||
var callback = function callback() { | ||
debug('finishing after-emit'); | ||
cb(); | ||
}; | ||
var compilationFileDependencies = void 0; | ||
var addFileDependency = void 0; | ||
if (Array.isArray(compilation.fileDependencies)) { | ||
compilationFileDependencies = new Set(compilation.fileDependencies); | ||
addFileDependency = function addFileDependency(file) { | ||
return compilation.fileDependencies.push(file); | ||
}; | ||
} else { | ||
compilationFileDependencies = compilation.fileDependencies; | ||
addFileDependency = function addFileDependency(file) { | ||
return compilation.fileDependencies.add(file); | ||
}; | ||
} | ||
var compilationContextDependencies = void 0; | ||
var addContextDependency = void 0; | ||
if (Array.isArray(compilation.contextDependencies)) { | ||
compilationContextDependencies = new Set(compilation.contextDependencies); | ||
addContextDependency = function addContextDependency(file) { | ||
return compilation.contextDependencies.push(file); | ||
}; | ||
} else { | ||
compilationContextDependencies = compilation.contextDependencies; | ||
addContextDependency = function addContextDependency(file) { | ||
return compilation.contextDependencies.add(file); | ||
}; | ||
} | ||
// Add file dependencies if they're not already tracked | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
try { | ||
for (var _iterator = fileDependencies[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var file = _step.value; | ||
if (compilationFileDependencies.has(file)) { | ||
debug('not adding ' + file + ' to change tracking, because it\'s already tracked'); | ||
} else { | ||
debug('adding ' + file + ' to change tracking'); | ||
addFileDependency(file); | ||
} | ||
} | ||
// Add context dependencies if they're not already tracked | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
} | ||
var _iteratorNormalCompletion2 = true; | ||
var _didIteratorError2 = false; | ||
var _iteratorError2 = undefined; | ||
try { | ||
for (var _iterator2 = contextDependencies[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { | ||
var _context = _step2.value; | ||
if (compilationContextDependencies.has(_context)) { | ||
debug('not adding ' + _context + ' to change tracking, because it\'s already tracked'); | ||
} else { | ||
debug('adding ' + _context + ' to change tracking'); | ||
addContextDependency(_context); | ||
} | ||
} | ||
} catch (err) { | ||
_didIteratorError2 = true; | ||
_iteratorError2 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion2 && _iterator2.return) { | ||
_iterator2.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError2) { | ||
throw _iteratorError2; | ||
} | ||
} | ||
} | ||
callback(); | ||
}; | ||
if (compiler.hooks) { | ||
var plugin = { name: 'CopyPlugin' }; | ||
compiler.hooks.emit.tapAsync(plugin, emit); | ||
compiler.hooks.afterEmit.tapAsync(plugin, afterEmit); | ||
for (const contextDependency of contextDependencies) { | ||
if (compilation.contextDependencies.has(contextDependency)) { | ||
logger.debug(`not adding '${contextDependency}' to change tracking, because it's already tracked`); | ||
} else { | ||
compiler.plugin('emit', emit); | ||
compiler.plugin('after-emit', afterEmit); | ||
logger.debug(`adding '${contextDependency}' to change tracking`); | ||
compilation.contextDependencies.add(contextDependency); | ||
} | ||
}; | ||
} | ||
return { | ||
apply: apply | ||
}; | ||
logger.debug('finishing after-emit'); | ||
callback(); | ||
}); | ||
} | ||
} | ||
CopyWebpackPlugin['default'] = CopyWebpackPlugin; | ||
module.exports = CopyWebpackPlugin; | ||
var _default = CopyPlugin; | ||
exports.default = _default; |
@@ -1,139 +0,150 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports.default = preProcessPattern; | ||
var _path = require('path'); | ||
var _path = _interopRequireDefault(require("path")); | ||
var _path2 = _interopRequireDefault(_path); | ||
var _isGlob = _interopRequireDefault(require("is-glob")); | ||
var _isGlob = require('is-glob'); | ||
var _normalizePath = _interopRequireDefault(require("normalize-path")); | ||
var _isGlob2 = _interopRequireDefault(_isGlob); | ||
var _normalize = _interopRequireDefault(require("./utils/normalize")); | ||
var _escape = require('./utils/escape'); | ||
var _isObject = _interopRequireDefault(require("./utils/isObject")); | ||
var _escape2 = _interopRequireDefault(_escape); | ||
var _promisify = require("./utils/promisify"); | ||
var _isObject = require('./utils/isObject'); | ||
var _isObject2 = _interopRequireDefault(_isObject); | ||
var _promisify = require('./utils/promisify'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// https://www.debuggex.com/r/VH2yS2mvJOitiyr3 | ||
var isTemplateLike = /(\[ext\])|(\[name\])|(\[path\])|(\[folder\])|(\[emoji(:\d+)?\])|(\[(\w+:)?hash(:\w+)?(:\d+)?\])|(\[\d+\])/; | ||
const isTemplateLike = /(\[ext\])|(\[name\])|(\[path\])|(\[folder\])|(\[emoji(:\d+)?\])|(\[(\w+:)?(hash|contenthash)(:\w+)?(:\d+)?\])|(\[\d+\])/; | ||
/* eslint-disable no-param-reassign */ | ||
function preProcessPattern(globalRef, pattern) { | ||
var info = globalRef.info, | ||
debug = globalRef.debug, | ||
warning = globalRef.warning, | ||
context = globalRef.context, | ||
inputFileSystem = globalRef.inputFileSystem, | ||
fileDependencies = globalRef.fileDependencies, | ||
contextDependencies = globalRef.contextDependencies, | ||
compilation = globalRef.compilation; | ||
const { | ||
logger, | ||
context, | ||
inputFileSystem, | ||
fileDependencies, | ||
contextDependencies, | ||
compilation | ||
} = globalRef; | ||
pattern = typeof pattern === 'string' ? { | ||
from: pattern | ||
} : Object.assign({}, pattern); | ||
if (pattern.from === '') { | ||
const message = 'path "from" cannot be empty string'; | ||
logger.error(message); | ||
throw new Error(message); | ||
} | ||
pattern = typeof pattern === 'string' ? { | ||
from: pattern | ||
} : Object.assign({}, pattern); | ||
pattern.to = pattern.to || ''; | ||
pattern.context = pattern.context || context; | ||
if (!_path2.default.isAbsolute(pattern.context)) { | ||
pattern.context = _path2.default.join(context, pattern.context); | ||
} | ||
pattern.ignore = globalRef.ignore.concat(pattern.ignore || []); | ||
pattern.to = pattern.to || ''; | ||
pattern.context = pattern.context || context; | ||
info('processing from: \'' + pattern.from + '\' to: \'' + pattern.to + '\''); | ||
if (!_path.default.isAbsolute(pattern.context)) { | ||
pattern.context = _path.default.join(context, pattern.context); | ||
} | ||
switch (true) { | ||
case !!pattern.toType: | ||
// if toType already exists | ||
break; | ||
case isTemplateLike.test(pattern.to): | ||
pattern.toType = 'template'; | ||
break; | ||
case _path2.default.extname(pattern.to) === '' || pattern.to.slice(-1) === '/': | ||
pattern.toType = 'dir'; | ||
break; | ||
default: | ||
pattern.toType = 'file'; | ||
} | ||
pattern.context = (0, _normalizePath.default)(pattern.context); | ||
pattern.ignore = globalRef.ignore.concat(pattern.ignore || []); | ||
logger.debug(`processing from: '${pattern.from}' to: '${pattern.to}'`); | ||
debug('determined \'' + pattern.to + '\' is a \'' + pattern.toType + '\''); | ||
switch (true) { | ||
// if toType already exists | ||
case !!pattern.toType: | ||
break; | ||
// If we know it's a glob, then bail early | ||
if ((0, _isObject2.default)(pattern.from) && pattern.from.glob) { | ||
pattern.fromType = 'glob'; | ||
case isTemplateLike.test(pattern.to): | ||
pattern.toType = 'template'; | ||
break; | ||
var fromArgs = Object.assign({}, pattern.from); | ||
delete fromArgs.glob; | ||
case _path.default.extname(pattern.to) === '' || pattern.to.slice(-1) === '/': | ||
pattern.toType = 'dir'; | ||
break; | ||
pattern.fromArgs = fromArgs; | ||
pattern.glob = (0, _escape2.default)(pattern.context, pattern.from.glob); | ||
pattern.absoluteFrom = _path2.default.resolve(pattern.context, pattern.from.glob); | ||
return Promise.resolve(pattern); | ||
} | ||
default: | ||
pattern.toType = 'file'; | ||
} // If we know it's a glob, then bail early | ||
if (_path2.default.isAbsolute(pattern.from)) { | ||
pattern.absoluteFrom = pattern.from; | ||
if ((0, _isObject.default)(pattern.from) && pattern.from.glob) { | ||
logger.debug(`determined '${pattern.absoluteFrom}' is a glob`); | ||
pattern.fromType = 'glob'; | ||
const globOptions = Object.assign({}, pattern.from); | ||
delete globOptions.glob; | ||
pattern.glob = (0, _normalize.default)(pattern.context, pattern.from.glob); | ||
pattern.globOptions = globOptions; | ||
pattern.absoluteFrom = (0, _normalizePath.default)(_path.default.resolve(pattern.context, pattern.from.glob)); | ||
return Promise.resolve(pattern); | ||
} | ||
if (_path.default.isAbsolute(pattern.from)) { | ||
pattern.absoluteFrom = pattern.from; | ||
} else { | ||
pattern.absoluteFrom = _path.default.resolve(pattern.context, pattern.from); | ||
} // Normalize path when path separators are mixed (like `C:\\directory/nested-directory/`) | ||
pattern.absoluteFrom = (0, _normalizePath.default)(pattern.absoluteFrom); | ||
logger.debug(`determined '${pattern.from}' to be read from '${pattern.absoluteFrom}'`); | ||
const noStatsHandler = () => { | ||
// If from doesn't appear to be a glob, then log a warning | ||
if ((0, _isGlob.default)(pattern.from) || pattern.from.indexOf('*') !== -1) { | ||
logger.debug(`determined '${pattern.absoluteFrom}' is a glob`); | ||
pattern.fromType = 'glob'; | ||
pattern.glob = (0, _normalize.default)(pattern.context, pattern.from); // We need to add context directory as dependencies to avoid problems when new files added in directories | ||
// when we already in watch mode and this directories are not in context dependencies | ||
contextDependencies.add(pattern.context); | ||
} else { | ||
pattern.absoluteFrom = _path2.default.resolve(pattern.context, pattern.from); | ||
} | ||
const newWarning = new Error(`unable to locate '${pattern.from}' at '${pattern.absoluteFrom}'`); | ||
const hasWarning = compilation.warnings.some( // eslint-disable-next-line no-shadow | ||
warning => warning.message === newWarning.message); // Only display the same message once | ||
debug('determined \'' + pattern.from + '\' to be read from \'' + pattern.absoluteFrom + '\''); | ||
if (!hasWarning) { | ||
logger.warn(newWarning.message); | ||
compilation.warnings.push(newWarning); | ||
} | ||
var noStatsHandler = function noStatsHandler() { | ||
// If from doesn't appear to be a glob, then log a warning | ||
if ((0, _isGlob2.default)(pattern.from) || pattern.from.indexOf('*') !== -1) { | ||
pattern.fromType = 'glob'; | ||
pattern.glob = (0, _escape2.default)(pattern.context, pattern.from); | ||
} else { | ||
var msg = 'unable to locate \'' + pattern.from + '\' at \'' + pattern.absoluteFrom + '\''; | ||
var warningMsg = '[copy-webpack-plugin] ' + msg; | ||
// only display the same message once | ||
if (compilation.errors.indexOf(warningMsg) === -1) { | ||
warning(msg); | ||
compilation.errors.push(warningMsg); | ||
} | ||
pattern.fromType = 'nonexistent'; | ||
} | ||
}; | ||
pattern.fromType = 'nonexistent'; | ||
} | ||
}; | ||
logger.debug(`getting stats for '${pattern.absoluteFrom}' to determinate 'fromType'`); | ||
return (0, _promisify.stat)(inputFileSystem, pattern.absoluteFrom).catch(() => noStatsHandler()).then(stats => { | ||
if (!stats) { | ||
noStatsHandler(); | ||
return pattern; | ||
} | ||
return (0, _promisify.stat)(inputFileSystem, pattern.absoluteFrom).catch(function () { | ||
return noStatsHandler(); | ||
}).then(function (stat) { | ||
if (!stat) { | ||
noStatsHandler(); | ||
return pattern; | ||
} | ||
if (stats.isDirectory()) { | ||
logger.debug(`determined '${pattern.absoluteFrom}' is a directory`); | ||
contextDependencies.add(pattern.absoluteFrom); | ||
pattern.fromType = 'dir'; | ||
pattern.context = pattern.absoluteFrom; | ||
pattern.glob = (0, _normalize.default)(pattern.absoluteFrom, '**/*'); | ||
pattern.absoluteFrom = (0, _normalizePath.default)(_path.default.join(pattern.absoluteFrom, '**/*')); | ||
pattern.globOptions = { | ||
dot: true | ||
}; | ||
} else if (stats.isFile()) { | ||
logger.debug(`determined '${pattern.absoluteFrom}' is a file`); | ||
fileDependencies.add(pattern.absoluteFrom); | ||
pattern.fromType = 'file'; | ||
pattern.context = (0, _normalizePath.default)(_path.default.dirname(pattern.absoluteFrom)); | ||
pattern.glob = (0, _normalize.default)(pattern.absoluteFrom); | ||
pattern.globOptions = { | ||
dot: true | ||
}; | ||
} else if (!pattern.fromType) { | ||
logger.warn(`unrecognized file type for ${pattern.from}`); | ||
} | ||
if (stat.isDirectory()) { | ||
pattern.fromType = 'dir'; | ||
pattern.context = pattern.absoluteFrom; | ||
contextDependencies.push(pattern.absoluteFrom); | ||
pattern.glob = (0, _escape2.default)(pattern.absoluteFrom, '**/*'); | ||
pattern.absoluteFrom = _path2.default.join(pattern.absoluteFrom, '**/*'); | ||
pattern.fromArgs = { | ||
dot: true | ||
}; | ||
} else if (stat.isFile()) { | ||
pattern.fromType = 'file'; | ||
pattern.context = _path2.default.dirname(pattern.absoluteFrom); | ||
pattern.glob = (0, _escape2.default)(pattern.absoluteFrom); | ||
pattern.fromArgs = { | ||
dot: true | ||
}; | ||
fileDependencies.push(pattern.absoluteFrom); | ||
} else if (!pattern.fromType) { | ||
info('Unrecognized file type for ' + pattern.from); | ||
} | ||
return pattern; | ||
}); | ||
return pattern; | ||
}); | ||
} |
@@ -1,138 +0,111 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports.default = processPattern; | ||
var _globby = require('globby'); | ||
var _path = _interopRequireDefault(require("path")); | ||
var _globby2 = _interopRequireDefault(_globby); | ||
var _globby = _interopRequireDefault(require("globby")); | ||
var _pLimit = require('p-limit'); | ||
var _pLimit = _interopRequireDefault(require("p-limit")); | ||
var _pLimit2 = _interopRequireDefault(_pLimit); | ||
var _minimatch = _interopRequireDefault(require("minimatch")); | ||
var _isGlob = require('is-glob'); | ||
var _normalizePath = _interopRequireDefault(require("normalize-path")); | ||
var _isGlob2 = _interopRequireDefault(_isGlob); | ||
var _isObject = _interopRequireDefault(require("./utils/isObject")); | ||
var _path = require('path'); | ||
var _path2 = _interopRequireDefault(_path); | ||
var _minimatch = require('minimatch'); | ||
var _minimatch2 = _interopRequireDefault(_minimatch); | ||
var _writeFile = require('./writeFile'); | ||
var _writeFile2 = _interopRequireDefault(_writeFile); | ||
var _isObject = require('./utils/isObject'); | ||
var _isObject2 = _interopRequireDefault(_isObject); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function processPattern(globalRef, pattern) { | ||
var info = globalRef.info, | ||
debug = globalRef.debug, | ||
output = globalRef.output, | ||
concurrency = globalRef.concurrency, | ||
contextDependencies = globalRef.contextDependencies; | ||
const { | ||
logger, | ||
output, | ||
concurrency | ||
} = globalRef; | ||
const globOptions = Object.assign({ | ||
cwd: pattern.context, | ||
follow: true | ||
}, pattern.globOptions || {}); | ||
var globArgs = Object.assign({ | ||
cwd: pattern.context | ||
}, pattern.fromArgs || {}); | ||
if (pattern.fromType === 'nonexistent') { | ||
return Promise.resolve(); | ||
} | ||
if (pattern.fromType === 'nonexistent') { | ||
return Promise.resolve(); | ||
} | ||
const limit = (0, _pLimit.default)(concurrency || 100); | ||
logger.info(`begin globbing '${pattern.glob}' with a context of '${pattern.context}'`); | ||
return (0, _globby.default)(pattern.glob, globOptions).then(paths => Promise.all(paths.map(from => limit(() => { | ||
const file = { | ||
force: pattern.force, | ||
absoluteFrom: _path.default.resolve(pattern.context, from) | ||
}; | ||
file.relativeFrom = _path.default.relative(pattern.context, file.absoluteFrom); | ||
var limit = (0, _pLimit2.default)(concurrency || 100); | ||
if (pattern.flatten) { | ||
file.relativeFrom = _path.default.basename(file.relativeFrom); | ||
} // Ensure forward slashes | ||
info('begin globbing \'' + pattern.glob + '\' with a context of \'' + pattern.context + '\''); | ||
return (0, _globby2.default)(pattern.glob, globArgs).then(function (paths) { | ||
return Promise.all(paths.map(function (from) { | ||
return limit(function () { | ||
var file = { | ||
force: pattern.force, | ||
absoluteFrom: _path2.default.resolve(pattern.context, from) | ||
}; | ||
file.relativeFrom = _path2.default.relative(pattern.context, file.absoluteFrom); | ||
if (pattern.flatten) { | ||
file.relativeFrom = _path2.default.basename(file.relativeFrom); | ||
} | ||
file.relativeFrom = (0, _normalizePath.default)(file.relativeFrom); | ||
logger.debug(`found ${from}`); // Check the ignore list | ||
// This is so webpack is able to watch the directory and when | ||
// a new file is added it triggeres a rebuild | ||
var contextPath = _path2.default.dirname(_path2.default.resolve(from)); | ||
if (contextDependencies.indexOf(contextPath) === -1 && (0, _isGlob2.default)(pattern.glob)) { | ||
contextDependencies.push(contextPath); | ||
} | ||
let il = pattern.ignore.length; // eslint-disable-next-line no-plusplus | ||
debug('found ' + from); | ||
while (il--) { | ||
const ignoreGlob = pattern.ignore[il]; | ||
let globParams = { | ||
dot: true, | ||
matchBase: true | ||
}; | ||
let glob; | ||
// Check the ignore list | ||
var il = pattern.ignore.length; | ||
while (il--) { | ||
var ignoreGlob = pattern.ignore[il]; | ||
if (typeof ignoreGlob === 'string') { | ||
glob = ignoreGlob; | ||
} else if ((0, _isObject.default)(ignoreGlob)) { | ||
glob = ignoreGlob.glob || ''; | ||
const ignoreGlobParams = Object.assign({}, ignoreGlob); | ||
delete ignoreGlobParams.glob; // Overwrite minimatch defaults | ||
var globParams = { | ||
dot: true, | ||
matchBase: true | ||
}; | ||
globParams = Object.assign(globParams, ignoreGlobParams); | ||
} else { | ||
glob = ''; | ||
} | ||
var glob = void 0; | ||
if (typeof ignoreGlob === 'string') { | ||
glob = ignoreGlob; | ||
} else if ((0, _isObject2.default)(ignoreGlob)) { | ||
glob = ignoreGlob.glob || ''; | ||
var ignoreGlobParams = Object.assign({}, ignoreGlob); | ||
delete ignoreGlobParams.glob; | ||
logger.debug(`testing ${glob} against ${file.relativeFrom}`); | ||
// Overwrite minimatch defaults | ||
globParams = Object.assign(globParams, ignoreGlobParams); | ||
} else { | ||
glob = ''; | ||
} | ||
if ((0, _minimatch.default)(file.relativeFrom, glob, globParams)) { | ||
logger.info(`ignoring '${file.relativeFrom}', because it matches the ignore glob '${glob}'`); | ||
return Promise.resolve(); | ||
} | ||
debug('testing ' + glob + ' against ' + file.relativeFrom); | ||
if ((0, _minimatch2.default)(file.relativeFrom, glob, globParams)) { | ||
info('ignoring \'' + file.relativeFrom + '\', because it matches the ignore glob \'' + glob + '\''); | ||
return Promise.resolve(); | ||
} else { | ||
debug(glob + ' doesn\'t match ' + file.relativeFrom); | ||
} | ||
} | ||
logger.debug(`${glob} doesn't match ${file.relativeFrom}`); | ||
} // Change the to path to be relative for webpack | ||
// Change the to path to be relative for webpack | ||
if (pattern.toType === 'dir') { | ||
file.webpackTo = _path2.default.join(pattern.to, file.relativeFrom); | ||
} else if (pattern.toType === 'file') { | ||
file.webpackTo = pattern.to || file.relativeFrom; | ||
} else if (pattern.toType === 'template') { | ||
file.webpackTo = pattern.to; | ||
file.webpackToRegExp = pattern.test; | ||
} | ||
if (_path2.default.isAbsolute(file.webpackTo)) { | ||
if (output === '/') { | ||
throw '[copy-webpack-plugin] Using older versions of webpack-dev-server, devServer.outputPath must be defined to write to absolute paths'; | ||
} | ||
if (pattern.toType === 'dir') { | ||
file.webpackTo = _path.default.join(pattern.to, file.relativeFrom); | ||
} else if (pattern.toType === 'file') { | ||
file.webpackTo = pattern.to || file.relativeFrom; | ||
} else if (pattern.toType === 'template') { | ||
file.webpackTo = pattern.to; | ||
file.webpackToRegExp = pattern.test; | ||
} | ||
file.webpackTo = _path2.default.relative(output, file.webpackTo); | ||
} | ||
if (_path.default.isAbsolute(file.webpackTo)) { | ||
if (output === '/') { | ||
const message = 'using older versions of webpack-dev-server, devServer.outputPath must be defined to write to absolute paths'; | ||
logger.error(message); | ||
throw new Error(message); | ||
} | ||
// ensure forward slashes | ||
file.webpackTo = file.webpackTo.replace(/\\/g, '/'); | ||
file.webpackTo = _path.default.relative(output, file.webpackTo); | ||
} // Ensure forward slashes | ||
info('determined that \'' + from + '\' should write to \'' + file.webpackTo + '\''); | ||
return (0, _writeFile2.default)(globalRef, pattern, file); | ||
}); | ||
})); | ||
}); | ||
file.webpackTo = (0, _normalizePath.default)(file.webpackTo); | ||
logger.info(`determined that '${from}' should write to '${file.webpackTo}'`); | ||
return file; | ||
})))); | ||
} |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,5 +6,6 @@ Object.defineProperty(exports, "__esModule", { | ||
}); | ||
exports.default = void 0; | ||
exports.default = function (val) { | ||
return Object.prototype.toString.call(val) === '[object Object]' ? true : false; | ||
}; | ||
var _default = val => Object.prototype.toString.call(val) === '[object Object]'; | ||
exports.default = _default; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
var stat = exports.stat = function stat(inputFileSystem, path) { | ||
return new Promise(function (resolve, reject) { | ||
inputFileSystem.stat(path, function (err, stats) { | ||
if (err) { | ||
reject(err); | ||
} | ||
resolve(stats); | ||
}); | ||
}); | ||
}; | ||
exports.readFile = exports.stat = void 0; | ||
var readFile = exports.readFile = function readFile(inputFileSystem, path) { | ||
return new Promise(function (resolve, reject) { | ||
inputFileSystem.readFile(path, function (err, stats) { | ||
if (err) { | ||
reject(err); | ||
} | ||
resolve(stats); | ||
}); | ||
}); | ||
}; | ||
const stat = (inputFileSystem, path) => new Promise((resolve, reject) => { | ||
inputFileSystem.stat(path, (err, stats) => { | ||
if (err) { | ||
reject(err); | ||
} | ||
resolve(stats); | ||
}); | ||
}); | ||
exports.stat = stat; | ||
const readFile = (inputFileSystem, path) => new Promise((resolve, reject) => { | ||
inputFileSystem.readFile(path, (err, stats) => { | ||
if (err) { | ||
reject(err); | ||
} | ||
resolve(stats); | ||
}); | ||
}); | ||
exports.readFile = readFile; |
123
package.json
{ | ||
"name": "copy-webpack-plugin", | ||
"version": "4.6.0", | ||
"version": "5.0.0", | ||
"description": "Copy files && directories with webpack", | ||
"license": "MIT", | ||
"repository": "webpack-contrib/copy-webpack-plugin", | ||
"author": "Len Boyette", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"homepage": "https://github.com/webpack-contrib/copy-webpack-plugin", | ||
"bugs": "https://github.com/webpack-contrib/copy-webpack-plugin/issues", | ||
"main": "dist/cjs.js", | ||
"engines": { | ||
"node": ">= 4" | ||
"node": ">= 6.9.0" | ||
}, | ||
"scripts": { | ||
"start": "npm run build -- -w", | ||
"prebuild": "npm run clean", | ||
"build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files", | ||
"clean": "del-cli dist", | ||
"commitlint": "commitlint", | ||
"commitmsg": "commitlint -e $GIT_PARAMS", | ||
"lint": "eslint --cache src test", | ||
"prepublish": "npm run build", | ||
"release": "standard-version", | ||
"security": "npm audit", | ||
"test:only": "jest", | ||
"test:watch": "jest --watch", | ||
"test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage", | ||
"pretest": "npm run lint", | ||
"test": "npm run test:only", | ||
"ci:lint": "npm run lint && npm run security", | ||
"ci:test": "npm run test:only -- --runInBand", | ||
"ci:coverage": "npm run test:coverage -- --runInBand", | ||
"ci:lint:commits": "commitlint --from=origin/master --to=${CIRCLE_SHA1}", | ||
"defaults": "webpack-defaults" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"lint": "eslint src/ tests/", | ||
"prepare": "npm run build", | ||
"release": "standard-version", | ||
"pretest": "npm run lint && npm run build && npm run build:tests", | ||
"test": "mocha compiled_tests/", | ||
"build": "babel src/ --out-dir dist/", | ||
"build:tests": "babel tests/ --out-dir compiled_tests/ && rimraf compiled_tests/helpers && ncp tests/helpers compiled_tests/helpers && node scripts/createSpecialDirectory.js" | ||
"peerDependencies": { | ||
"webpack": "^4.0.0" | ||
}, | ||
"dependencies": { | ||
"cacache": "^11.3.1", | ||
"find-cache-dir": "^2.0.0", | ||
"globby": "^7.1.1", | ||
"cacache": "^10.0.4", | ||
"find-cache-dir": "^1.0.0", | ||
"serialize-javascript": "^1.4.0", | ||
"is-glob": "^4.0.0", | ||
"loader-utils": "^1.1.0", | ||
"minimatch": "^3.0.4", | ||
"p-limit": "^1.0.0" | ||
"normalize-path": "^3.0.0", | ||
"p-limit": "^2.1.0", | ||
"serialize-javascript": "^1.4.0", | ||
"webpack-log": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.8.0", | ||
"babel-preset-es2015": "^6.6.0", | ||
"chai": "^3.4.0", | ||
"@babel/cli": "^7.1.5", | ||
"@babel/core": "^7.1.6", | ||
"@babel/polyfill": "^7.0.0", | ||
"@babel/preset-env": "^7.1.6", | ||
"@commitlint/cli": "^7.5.2", | ||
"@commitlint/config-conventional": "^7.5.0", | ||
"@webpack-contrib/defaults": "^3.0.5", | ||
"@webpack-contrib/eslint-config-webpack": "^3.0.0", | ||
"babel-jest": "^24.1.0", | ||
"cross-env": "^5.1.3", | ||
"del": "^3.0.0", | ||
"del-cli": "^1.1.0", | ||
"enhanced-resolve": "^3.4.1", | ||
"eslint": "^2.9.0", | ||
"eslint": "^5.13.0", | ||
"eslint-plugin-import": "^2.8.0", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"husky": "^1.2.1", | ||
"is-gzip": "^2.0.0", | ||
"jest": "^24.0.0", | ||
"lint-staged": "^8.1.0", | ||
"memory-fs": "^0.4.1", | ||
"mkdirp": "^0.5.1", | ||
"mocha": "^2.4.5", | ||
"ncp": "^2.0.0", | ||
"rimraf": "^2.6.2", | ||
"standard-version": "^4.2.0" | ||
"prettier": "^1.14.0", | ||
"spdy": "^4.0.0", | ||
"standard-version": "^5.0.0", | ||
"webpack": "^4.29.4" | ||
}, | ||
"homepage": "https://github.com/webpack-contrib/copy-webpack-plugin", | ||
"bugs": "https://github.com/webpack-contrib/copy-webpack-plugin/issues", | ||
"repository": "https://github.com/webpack-contrib/copy-webpack-plugin.git", | ||
"keywords": [ | ||
@@ -55,3 +88,37 @@ "webpack", | ||
"copy" | ||
] | ||
], | ||
"babel": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "6.9.0" | ||
}, | ||
"useBuiltIns": "usage" | ||
} | ||
] | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"eslint --fix", | ||
"git add" | ||
] | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"prettier": { | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"arrowParens": "always" | ||
} | ||
} |
611
README.md
@@ -1,8 +0,1 @@ | ||
[![npm][npm]][npm-url] | ||
[![node][node]][node-url] | ||
[![deps][deps]][deps-url] | ||
[![test][test]][test-url] | ||
[![coverage][cover]][cover-url] | ||
[![chat][chat]][chat-url] | ||
<div align="center"> | ||
@@ -13,138 +6,168 @@ <a href="https://github.com/webpack/webpack"> | ||
</a> | ||
<h1>Copy Webpack Plugin</h1> | ||
<p>Copies individual files or entire directories to the build directory</p> | ||
</div> | ||
<h2 align="center">Install</h2> | ||
[![npm][npm]][npm-url] | ||
[![node][node]][node-url] | ||
[![deps][deps]][deps-url] | ||
[![tests][tests]][tests-url] | ||
[![cover][cover]][cover-url] | ||
[![chat][chat]][chat-url] | ||
[![size][size]][size-url] | ||
```bash | ||
npm i -D copy-webpack-plugin | ||
# copy-webpack-plugin | ||
Copies individual files or entire directories to the build directory. | ||
## Getting Started | ||
To begin, you'll need to install `copy-webpack-plugin`: | ||
```console | ||
$ npm install copy-webpack-plugin --save-dev | ||
``` | ||
<h2 align="center">Usage</h2> | ||
Then add the loader to your `webpack` config. For example: | ||
**webpack.config.js** | ||
```js | ||
const CopyWebpackPlugin = require('copy-webpack-plugin') | ||
const CopyPlugin = require('copy-webpack-plugin'); | ||
const config = { | ||
module.exports = { | ||
plugins: [ | ||
new CopyWebpackPlugin([ ...patterns ], options) | ||
] | ||
} | ||
new CopyPlugin([ | ||
{ from: 'source', to: 'dest' }, | ||
{ from: 'other', to: 'public' }, | ||
]), | ||
], | ||
}; | ||
``` | ||
> ℹ️ If you want `webpack-dev-server` to write files to the output directory during development, you can force it with the [`write-file-webpack-plugin`](https://github.com/gajus/write-file-webpack-plugin). | ||
> ℹ️ If you want `webpack-dev-server` to write files to the output directory during development, you can force it with the [`writeToDisk`](https://github.com/webpack/webpack-dev-middleware#writetodisk) option or the [`write-file-webpack-plugin`](https://github.com/gajus/write-file-webpack-plugin). | ||
### `Patterns` | ||
## Options | ||
A simple pattern looks like this | ||
The plugin's signature: | ||
**webpack.config.js** | ||
```js | ||
{ from: 'source', to: 'dest' } | ||
module.exports = { | ||
plugins: [new CopyPlugin(patterns, options)], | ||
}; | ||
``` | ||
Or, in case of just a `from` with the default destination, you can also use a `{String}` as shorthand instead of an `{Object}` | ||
### Patterns | ||
```js | ||
'source' | ||
``` | ||
| Name | Type | Default | Description | | ||
| :-------------------------------: | :-------------------: | :---------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| [`from`](#from) | `{String\|Object}` | `undefined` | Globs accept [minimatch options](https://github.com/isaacs/minimatch). See the [`node-glob` options](https://github.com/isaacs/node-glob#options) in addition to the ones below. | | ||
| [`to`](#to) | `{String\|Object}` | `undefined` | Output root if `from` is file or dir, resolved glob path if `from` is glob. | | ||
| [`toType`](#toType) | `{String}` | `undefined` | `[toType Options](#totype)`. | | ||
| [`test`](#test) | `{RegExp}` | `undefined` | Pattern for extracting elements to be used in `to` templates. | | ||
| [`force`](#force) | `{Boolean}` | `false` | Overwrites files already in `compilation.assets` (usually added by other plugins/loaders). | | ||
| [`ignore`](#ignore) | `{Array}` | `[]` | Globs to ignore for this pattern. | | ||
| [`flatten`](#flatten) | `{Boolean}` | `false` | Removes all directory references and only copies file names.⚠️ If files have the same name, the result is non-deterministic. | | ||
| [`transform`](#transform) | `{Function\|Promise}` | `(content, path) => content` | Function or Promise that modifies file contents before copying. | | ||
| [`transformPath`](#transformPath) | `{Function\|Promise}` | `(targetPath, sourcePath) => path` | Function or Promise that modifies file writing path. | | ||
| [`cache`](#cache) | `{Boolean\|Object}` | `false` | Enable `transform` caching. You can use `{ cache: { key: 'my-cache-key' } }` to invalidate the cache. | | ||
| [`context`](#context) | `{String}` | `options.context \|\| compiler.options.context` | A path that determines how to interpret the `from` path. | | ||
|Name|Type|Default|Description| | ||
|:--:|:--:|:-----:|:----------| | ||
|[`from`](#from)|`{String\|Object}`|`undefined`|Globs accept [minimatch options](https://github.com/isaacs/minimatch)| | ||
|[`fromArgs`](#fromArgs)|`{Object}`|`{ cwd: context }`|See the [`node-glob` options](https://github.com/isaacs/node-glob#options) in addition to the ones below| | ||
|[`to`](#to)|`{String\|Object}`|`undefined`|Output root if `from` is file or dir, resolved glob path if `from` is glob| | ||
|[`toType`](#toType)|`{String}`|``|[toType Options](#totype)| | ||
|[`test`](#test)|`{RegExp}`|``|Pattern for extracting elements to be used in `to` templates| | ||
|[`force`](#force)|`{Boolean}`|`false`|Overwrites files already in `compilation.assets` (usually added by other plugins/loaders)| | ||
|[`ignore`](#ignore)|`{Array}`|`[]`|Globs to ignore for this pattern| | ||
|`flatten`|`{Boolean}`|`false`|Removes all directory references and only copies file names.⚠️ If files have the same name, the result is non-deterministic| | ||
|[`transform`](#transform)|`{Function\|Promise}`|`(content, path) => content`|Function or Promise that modifies file contents before copying| | ||
|[`transformPath`](#transformPath)|`{Function\|Promise}`|`(targetPath, sourcePath) => path`|Function or Promise that modifies file writing path| | ||
|[`cache`](#cache)|`{Boolean\|Object}`|`false`|Enable `transform` caching. You can use `{ cache: { key: 'my-cache-key' } }` to invalidate the cache| | ||
|[`context`](#context)|`{String}`|`options.context \|\| compiler.options.context`|A path that determines how to interpret the `from` path| | ||
#### `from` | ||
### `from` | ||
**webpack.config.js** | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
'relative/path/to/file.ext', | ||
'/absolute/path/to/file.ext', | ||
'relative/path/to/dir', | ||
'/absolute/path/to/dir', | ||
'**/*', | ||
{ glob: '\*\*/\*', dot: true } | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
'relative/path/to/file.ext', | ||
'/absolute/path/to/file.ext', | ||
'relative/path/to/dir', | ||
'/absolute/path/to/dir', | ||
'**/*', | ||
{ glob: '**/*', dot: false }, | ||
]), | ||
], | ||
}; | ||
``` | ||
### `to` | ||
#### `to` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ from: '**/*', to: 'relative/path/to/dest/' }, | ||
{ from: '**/*', to: '/absolute/path/to/dest/' } | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ from: '**/*', to: 'relative/path/to/dest/' }, | ||
{ from: '**/*', to: '/absolute/path/to/dest/' }, | ||
]), | ||
], | ||
}; | ||
``` | ||
### `toType` | ||
#### `toType` | ||
|Name|Type|Default|Description| | ||
|:--:|:--:|:-----:|:----------| | ||
|**`'dir'`**|`{String}`|`undefined`|If `from` is directory, `to` has no extension or ends in `'/'`| | ||
|**`'file'`**|`{String}`|`undefined`|If `to` has extension or `from` is file| | ||
|**`'template'`**|`{String}`|`undefined`|If `to` contains [a template pattern](https://github.com/webpack-contrib/file-loader#placeholders)| | ||
| Name | Type | Default | Description | | ||
| :--------------: | :--------: | :---------: | :------------------------------------------------------------------------------------------------- | | ||
| **`'dir'`** | `{String}` | `undefined` | If `from` is directory, `to` has no extension or ends in `'/'` | | ||
| **`'file'`** | `{String}` | `undefined` | If `to` has extension or `from` is file | | ||
| **`'template'`** | `{String}` | `undefined` | If `to` contains [a template pattern](https://github.com/webpack-contrib/file-loader#placeholders) | | ||
#### `'dir'` | ||
##### `'dir'` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: 'path/to/file.txt', | ||
to: 'directory/with/extension.ext', | ||
toType: 'dir' | ||
} | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'path/to/file.txt', | ||
to: 'directory/with/extension.ext', | ||
toType: 'dir', | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
#### `'file'` | ||
##### `'file'` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: 'path/to/file.txt', | ||
to: 'file/without/extension', | ||
toType: 'file' | ||
}, | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'path/to/file.txt', | ||
to: 'file/without/extension', | ||
toType: 'file', | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
#### `'template'` | ||
##### `'template'` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: 'src/', | ||
to: 'dest/[name].[hash].[ext]', | ||
toType: 'template' | ||
} | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/', | ||
to: 'dest/[name].[hash].[ext]', | ||
toType: 'template', | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
### `test` | ||
#### `test` | ||
@@ -158,227 +181,270 @@ Defines a `{RegExp}` to match some parts of the file path. | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: '*/*', | ||
to: '[1]-[2].[hash].[ext]', | ||
test: /([^/]+)\/(.+)\.png$/ | ||
} | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: '*/*', | ||
to: '[1]-[2].[hash].[ext]', | ||
test: /([^/]+)\/(.+)\.png$/, | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
### `force` | ||
#### `force` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ from: 'src/**/*', to: 'dest/', force: true } | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/**/*', | ||
to: 'dest/', | ||
force: true, | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
### `ignore` | ||
#### `ignore` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ from: 'src/**/*', to: 'dest/', ignore: [ '*.js' ] } | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/**/*', | ||
to: 'dest/', | ||
ignore: ['*.js'], | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
### `flatten` | ||
#### `flatten` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ from: 'src/**/*', to: 'dest/', flatten: true } | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/**/*', | ||
to: 'dest/', | ||
flatten: true, | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
### `transform` | ||
#### `transform` | ||
#### `{Function}` | ||
##### `{Function}` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transform (content, path) { | ||
return optimize(content) | ||
} | ||
} | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transform(content, path) { | ||
return optimize(content); | ||
}, | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
#### `{Promise}` | ||
##### `{Promise}` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transform (content, path) { | ||
return Promise.resolve(optimize(content)) | ||
} | ||
} | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transform(content, path) { | ||
return Promise.resolve(optimize(content)); | ||
}, | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
### `transformPath` | ||
#### `transformPath` | ||
#### `{Function}` | ||
##### `{Function}` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transformPath (targetPath, absolutePath) { | ||
return 'newPath'; | ||
} | ||
} | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transformPath(targetPath, absolutePath) { | ||
return 'newPath'; | ||
}, | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
#### `{Promise}` | ||
##### `{Promise}` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transform (targePath, absolutePath) { | ||
return Promise.resolve('newPath') | ||
} | ||
} | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transformPath(targePath, absolutePath) { | ||
return Promise.resolve('newPath'); | ||
}, | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
#### `cache` | ||
### `cache` | ||
**webpack.config.js** | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transform (content, path) { | ||
return optimize(content) | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/*.png', | ||
to: 'dest/', | ||
transform(content, path) { | ||
return optimize(content); | ||
}, | ||
cache: true, | ||
}, | ||
cache: true | ||
} | ||
], options) | ||
] | ||
]), | ||
], | ||
}; | ||
``` | ||
### `context` | ||
#### `context` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin([ | ||
{ from: 'src/*.txt', to: 'dest/', context: 'app/' } | ||
], options) | ||
] | ||
module.exports = { | ||
plugins: [ | ||
new CopyPlugin([ | ||
{ | ||
from: 'src/*.txt', | ||
to: 'dest/', | ||
context: 'app/', | ||
}, | ||
]), | ||
], | ||
}; | ||
``` | ||
<h2 align="center">Options</h2> | ||
### Options | ||
|Name|Type|Default|Description| | ||
|:--:|:--:|:-----:|:----------| | ||
|[`debug`](#debug)|`{String}`|**`'warning'`**|[Debug Options](#debug)| | ||
|[`ignore`](#ignore)|`{Array}`|`[]`|Array of globs to ignore (applied to `from`)| | ||
|[`context`](#context)|`{String}`|`compiler.options.context`|A path that determines how to interpret the `from` path, shared for all patterns| | ||
|[`copyUnmodified`](#copyUnmodified)|`{Boolean}`|`false`|Copies files, regardless of modification when using watch or `webpack-dev-server`. All files are copied on first build, regardless of this option| | ||
| Name | Type | Default | Description | | ||
| :---------------------------------: | :---------: | :------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| [`logLevel`](#logLevel) | `{String}` | **`'warning'`** | Level of messages that the module will log | | ||
| [`ignore`](#ignore) | `{Array}` | `[]` | Array of globs to ignore (applied to `from`) | | ||
| [`context`](#context) | `{String}` | `compiler.options.context` | A path that determines how to interpret the `from` path, shared for all patterns | | ||
| [`copyUnmodified`](#copyUnmodified) | `{Boolean}` | `false` | Copies files, regardless of modification when using watch or `webpack-dev-server`. All files are copied on first build, regardless of this option | | ||
### `debug` | ||
#### `logLevel` | ||
|Name|Type|Default|Description| | ||
|:--:|:--:|:-----:|:----------| | ||
|**`'info'`**|`{String\|Boolean}`|`false`|File location and read info| | ||
|**`'debug'`**|`{String}`|`false`|Very detailed debugging info| | ||
|**`'warning'`**|`{String}`|`true`|Only warnings| | ||
This property defines the level of messages that the module will log. Valid levels include: | ||
#### `'info'` | ||
- `trace` | ||
- `debug` | ||
- `info` | ||
- `warn` | ||
- `error` | ||
- `silent` | ||
Setting a log level means that all other levels below it will be visible in the | ||
console. Setting `logLevel: 'silent'` will hide all console output. The module | ||
leverages [`webpack-log`](https://github.com/webpack-contrib/webpack-log#readme) | ||
for logging management, and more information can be found on its page. | ||
##### `'info'` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin( | ||
[ ...patterns ], | ||
{ debug: 'info' } | ||
) | ||
] | ||
module.exports = { | ||
plugins: [new CopyPlugin([...patterns], { debug: 'info' })], | ||
}; | ||
``` | ||
#### `'debug'` | ||
##### `'debug'` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin( | ||
[ ...patterns ], | ||
{ debug: 'debug' } | ||
) | ||
] | ||
module.exports = { | ||
plugins: [new CopyPlugin([...patterns], { debug: 'debug' })], | ||
}; | ||
``` | ||
#### `'warning' (default)` | ||
##### `'warning' (default)` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin( | ||
[ ...patterns ], | ||
{ debug: true } | ||
) | ||
] | ||
module.exports = { | ||
plugins: [new CopyPlugin([...patterns], { debug: true })], | ||
}; | ||
``` | ||
### `ignore` | ||
#### `ignore` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin( | ||
[ ...patterns ], | ||
{ ignore: [ '*.js', '*.css' ] } | ||
) | ||
] | ||
module.exports = { | ||
plugins: [new CopyPlugin([...patterns], { ignore: ['*.js', '*.css'] })], | ||
}; | ||
``` | ||
### `context` | ||
#### `context` | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin( | ||
[ ...patterns ], | ||
{ context: '/app' } | ||
) | ||
] | ||
module.exports = { | ||
plugins: [new CopyPlugin([...patterns], { context: '/app' })], | ||
}; | ||
``` | ||
### `copyUnmodified` | ||
#### `copyUnmodified` | ||
@@ -388,65 +454,32 @@ > ℹ️ By default, we only copy **modified** files during a `webpack --watch` or `webpack-dev-server` build. Setting this option to `true` will copy all files. | ||
**webpack.config.js** | ||
```js | ||
[ | ||
new CopyWebpackPlugin( | ||
[ ...patterns ], | ||
{ copyUnmodified: true } | ||
) | ||
] | ||
module.exports = { | ||
plugins: [new CopyPlugin([...patterns], { copyUnmodified: true })], | ||
}; | ||
``` | ||
<h2 align="center">Maintainers</h2> | ||
## Contributing | ||
<table> | ||
<tbody> | ||
<tr> | ||
<td align="center"> | ||
<a href="https://github.com/bebraw"> | ||
<img width="150" height="150" src="https://github.com/bebraw.png?v=3&s=150"> | ||
</br> | ||
Juho Vepsäläinen | ||
</a> | ||
</td> | ||
<td align="center"> | ||
<a href="https://github.com/d3viant0ne"> | ||
<img width="150" height="150" src="https://github.com/d3viant0ne.png?v=3&s=150"> | ||
</br> | ||
Joshua Wiens | ||
</a> | ||
</td> | ||
<td align="center"> | ||
<a href="https://github.com/michael-ciniawsky"> | ||
<img width="150" height="150" src="https://github.com/michael-ciniawsky.png?v=3&s=150"> | ||
</br> | ||
Michael Ciniawsky | ||
</a> | ||
</td> | ||
<td align="center"> | ||
<a href="https://github.com/evilebottnawi"> | ||
<img width="150" height="150" src="https://github.com/evilebottnawi.png?v=3&s=150"> | ||
</br> | ||
Alexander Krasnoyarov | ||
</a> | ||
</td> | ||
</tr> | ||
<tbody> | ||
</table> | ||
Please take a moment to read our contributing guidelines if you haven't yet done so. | ||
[CONTRIBUTING](./.github/CONTRIBUTING.md) | ||
## License | ||
[MIT](./LICENSE) | ||
[npm]: https://img.shields.io/npm/v/copy-webpack-plugin.svg | ||
[npm-url]: https://npmjs.com/package/copy-webpack-plugin | ||
[node]: https://img.shields.io/node/v/copy-webpack-plugin.svg | ||
[node-url]: https://nodejs.org | ||
[deps]: https://david-dm.org/webpack-contrib/copy-webpack-plugin.svg | ||
[deps-url]: https://david-dm.org/webpack-contrib/copy-webpack-plugin | ||
[test]: https://secure.travis-ci.org/webpack-contrib/copy-webpack-plugin.svg | ||
[test-url]: http://travis-ci.org/webpack-contrib/copy-webpack-plugin | ||
[tests]: https://secure.travis-ci.org/webpack-contrib/copy-webpack-plugin.svg | ||
[tests-url]: http://travis-ci.org/webpack-contrib/copy-webpack-plugin | ||
[cover]: https://codecov.io/gh/webpack-contrib/copy-webpack-plugin/branch/master/graph/badge.svg | ||
[cover-url]: https://codecov.io/gh/webpack-contrib/copy-webpack-plugin | ||
[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg | ||
[chat-url]: https://gitter.im/webpack/webpack | ||
[size]: https://packagephobia.now.sh/badge?p=copy-webpack-plugin | ||
[size-url]: https://packagephobia.now.sh/result?p=copy-webpack-plugin |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
51429
483
11
26
12
474
1
+ Addednormalize-path@^3.0.0
+ Addedwebpack-log@^2.0.0
+ Added@webassemblyjs/ast@1.9.0(transitive)
+ Added@webassemblyjs/floating-point-hex-parser@1.9.0(transitive)
+ Added@webassemblyjs/helper-api-error@1.9.0(transitive)
+ Added@webassemblyjs/helper-buffer@1.9.0(transitive)
+ Added@webassemblyjs/helper-code-frame@1.9.0(transitive)
+ Added@webassemblyjs/helper-fsm@1.9.0(transitive)
+ Added@webassemblyjs/helper-module-context@1.9.0(transitive)
+ Added@webassemblyjs/helper-wasm-bytecode@1.9.0(transitive)
+ Added@webassemblyjs/helper-wasm-section@1.9.0(transitive)
+ Added@webassemblyjs/ieee754@1.9.0(transitive)
+ Added@webassemblyjs/leb128@1.9.0(transitive)
+ Added@webassemblyjs/utf8@1.9.0(transitive)
+ Added@webassemblyjs/wasm-edit@1.9.0(transitive)
+ Added@webassemblyjs/wasm-gen@1.9.0(transitive)
+ Added@webassemblyjs/wasm-opt@1.9.0(transitive)
+ Added@webassemblyjs/wasm-parser@1.9.0(transitive)
+ Added@webassemblyjs/wast-parser@1.9.0(transitive)
+ Added@webassemblyjs/wast-printer@1.9.0(transitive)
+ Added@xtuc/ieee754@1.2.0(transitive)
+ Added@xtuc/long@4.2.2(transitive)
+ Addedacorn@6.4.2(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedajv-errors@1.0.1(transitive)
+ Addedajv-keywords@3.5.2(transitive)
+ Addedansi-colors@3.2.4(transitive)
+ Addedanymatch@2.0.03.1.3(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-unique@0.3.2(transitive)
+ Addedasn1.js@4.10.1(transitive)
+ Addedassert@1.5.1(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedasync-each@1.0.6(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbinary-extensions@1.13.12.3.0(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedbn.js@4.12.05.2.1(transitive)
+ Addedbraces@2.3.23.0.3(transitive)
+ Addedbrorand@1.1.0(transitive)
+ Addedbrowserify-aes@1.2.0(transitive)
+ Addedbrowserify-cipher@1.0.1(transitive)
+ Addedbrowserify-des@1.0.2(transitive)
+ Addedbrowserify-rsa@4.1.1(transitive)
+ Addedbrowserify-sign@4.2.3(transitive)
+ Addedbrowserify-zlib@0.2.0(transitive)
+ Addedbuffer@4.9.2(transitive)
+ Addedbuffer-xor@1.0.3(transitive)
+ Addedbuiltin-status-codes@3.0.0(transitive)
+ Addedcacache@11.3.312.0.4(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedchokidar@2.1.83.6.0(transitive)
+ Addedchrome-trace-event@1.0.4(transitive)
+ Addedcipher-base@1.0.4(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedconsole-browserify@1.2.0(transitive)
+ Addedconstants-browserify@1.0.0(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addedcreate-ecdh@4.0.4(transitive)
+ Addedcreate-hash@1.2.0(transitive)
+ Addedcreate-hmac@1.1.7(transitive)
+ Addedcrypto-browserify@3.12.0(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addeddes.js@1.1.0(transitive)
+ Addeddiffie-hellman@5.0.3(transitive)
+ Addeddomain-browser@1.2.0(transitive)
+ Addedelliptic@6.5.7(transitive)
+ Addedenhanced-resolve@4.5.0(transitive)
+ Addederrno@0.1.8(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedeslint-scope@4.0.3(transitive)
+ Addedesrecurse@4.3.0(transitive)
+ Addedestraverse@4.3.05.3.0(transitive)
+ Addedevents@3.3.0(transitive)
+ Addedevp_bytestokey@1.0.3(transitive)
+ Addedexpand-brackets@2.1.4(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@2.0.4(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfiggy-pudding@3.5.2(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedfill-range@4.0.07.1.1(transitive)
+ Addedfind-cache-dir@2.1.0(transitive)
+ Addedfind-up@3.0.0(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfsevents@1.2.132.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedglob-parent@3.1.05.1.2(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhash-base@3.0.4(transitive)
+ Addedhash.js@1.1.7(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhmac-drbg@1.0.1(transitive)
+ Addedhttps-browserify@1.0.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedinfer-owner@1.0.4(transitive)
+ Addedinherits@2.0.3(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-binary-path@1.0.12.1.0(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-glob@3.1.0(transitive)
+ Addedis-number@3.0.07.0.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedis-wsl@1.1.0(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedjson-parse-better-errors@1.0.2(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedloader-runner@2.4.0(transitive)
+ Addedlocate-path@3.0.0(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedmake-dir@2.1.0(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmd5.js@1.3.5(transitive)
+ Addedmemory-fs@0.4.10.5.0(transitive)
+ Addedmicromatch@3.1.10(transitive)
+ Addedmiller-rabin@4.0.1(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)
+ Addedminimalistic-crypto-utils@1.0.1(transitive)
+ Addedmississippi@3.0.0(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedms@2.0.0(transitive)
+ Addednan@2.20.0(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addedneo-async@2.6.2(transitive)
+ Addednode-libs-browser@2.2.1(transitive)
+ Addednormalize-path@2.1.13.0.0(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-inspect@1.13.2(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedos-browserify@0.3.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@3.0.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpako@1.0.11(transitive)
+ Addedparse-asn1@5.1.7(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedpath-browserify@0.0.1(transitive)
+ Addedpath-dirname@1.0.2(transitive)
+ Addedpbkdf2@3.1.2(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedpkg-dir@3.0.0(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedprocess@0.11.10(transitive)
+ Addedprr@1.0.1(transitive)
+ Addedpublic-encrypt@4.0.3(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedpunycode@1.4.12.3.1(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedquerystring-es3@0.2.1(transitive)
+ Addedrandombytes@2.1.0(transitive)
+ Addedrandomfill@1.0.4(transitive)
+ Addedreaddirp@2.2.13.6.0(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedret@0.1.15(transitive)
+ Addedripemd160@2.0.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedschema-utils@1.0.0(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedserialize-javascript@4.0.0(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedsha.js@2.4.11(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-list-map@2.0.1(transitive)
+ Addedsource-map@0.5.70.6.1(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-support@0.5.21(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedssri@6.0.2(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedstream-browserify@2.0.2(transitive)
+ Addedstream-http@2.8.3(transitive)
+ Addedtapable@1.1.3(transitive)
+ Addedterser@4.8.1(transitive)
+ Addedterser-webpack-plugin@1.4.6(transitive)
+ Addedtimers-browserify@2.0.12(transitive)
+ Addedto-arraybuffer@1.0.1(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.15.0.1(transitive)
+ Addedtty-browserify@0.0.0(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedupath@1.2.0(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedurix@0.1.0(transitive)
+ Addedurl@0.11.4(transitive)
+ Addeduse@3.1.1(transitive)
+ Addedutil@0.10.40.11.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedvm-browserify@1.1.2(transitive)
+ Addedwatchpack@1.7.5(transitive)
+ Addedwatchpack-chokidar2@2.0.1(transitive)
+ Addedwebpack@4.47.0(transitive)
+ Addedwebpack-log@2.0.0(transitive)
+ Addedwebpack-sources@1.4.3(transitive)
+ Addedworker-farm@1.7.0(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedcacache@10.0.4(transitive)
- Removedfind-cache-dir@1.0.0(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedmake-dir@1.3.0(transitive)
- Removedmississippi@2.0.0(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
- Removedpkg-dir@2.0.0(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedssri@5.3.0(transitive)
- Removedyallist@2.1.2(transitive)
Updatedcacache@^11.3.1
Updatedfind-cache-dir@^2.0.0
Updatedp-limit@^2.1.0