dirtransfer-webpack-plugin
v0.0.1
Published
transfer directories around
Downloads
3
Maintainers
Readme
Transfer Webpack Plugin
Transfer files to the build directory
Getting started
Install the plugin:
npm install --save-dev dirtransfer-webpack-plugin
API
new DirTransferPlugin(patterns: array, [basePaths: object])
patterns
– array of patterns{ src: 'path', dest: 'path' }
,src
– relative tosrc
property ofbasePaths
object or tocontext
of your config (if the former is missing),dest
– relative todest
property ofbasePaths
object or tocontext
of your config (if the former is missing)basePaths
(optional) – object{ src: 'base path for src pattern', dest: 'base path for src pattern' }
,src
- individualsrc
path patterns inpatterns
array will be resolved relative to this base path,dest
- individualdest
path patterns inpatterns
array will be resolved relative to this base path,
Usage
var DirTransferPlugin = require('transfer-webpack-plugin');
module.exports = {
context: path.join(__dirname, 'app'),
plugins: [
new DirTransferPlugin([
{ src: 'cred_dev', dest: 'cred' },
{ src: 'logger_dev' }
])
]
};
module.exports = {
plugins: [
new DirTransferPlugin([
{ src: 'cred_dev', dest: 'cred' },
{ src: 'logger_dev' }
], {
src: path.join(__dirname, 'app'),
dest: path.join('/Users/test/Documents/project')
})
]
};