copify-webpack-plugin
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -42,2 +42,3 @@ 'use strict'; | ||
options.manifest = options.manifest ? Object.assign({}, { | ||
basePath: '', | ||
path: '.', | ||
@@ -108,2 +109,6 @@ filename: 'webpack-assets.json', | ||
_bluebird2.default.each(patterns, function (pattern) { | ||
if (options.manifest) { | ||
pattern.manifestBasePath = pattern.manifestBasePath ? pattern.manifestBasePath : options.manifest.basePath; | ||
} | ||
// Identify absolute source of each pattern and destination type | ||
@@ -115,3 +120,3 @@ return (0, _preProcessPattern2.default)(globalRef, pattern).then(function (pattern) { | ||
}).then(function () { | ||
if (options.manifest) { | ||
if (options.manifest && Object.keys(assetsMap).length > 0) { | ||
(function () { | ||
@@ -118,0 +123,0 @@ var outputPath = _path2.default.join(options.manifest.path, options.manifest.filename); |
@@ -88,3 +88,15 @@ 'use strict'; | ||
if (assetsMap && !pattern.excludeFromManifest) { | ||
assetsMap[file.relativeFrom] = file.webpackTo; | ||
var manifestFrom = file.relativeFrom; | ||
var manifestTo = file.webpackTo; | ||
if (pattern.toType === 'template') { | ||
file.relativeFromForManifest = manifestFrom[0] === _path2.default.sep ? manifestFrom.substring(1) : manifestFrom; | ||
} | ||
if (pattern.manifestBasePath) { | ||
manifestFrom = _path2.default.join(pattern.manifestBasePath, manifestFrom); | ||
manifestTo = _path2.default.join(pattern.manifestBasePath, manifestTo); | ||
} | ||
assetsMap[manifestFrom] = manifestTo; | ||
} | ||
@@ -91,0 +103,0 @@ |
{ | ||
"name": "copify-webpack-plugin", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Copy files and directories in webpack, supported manifest", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
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
29686
416