0.0.1 • Published 10 years ago
dirtransfer-webpack-plugin v0.0.1
Transfer Webpack Plugin
Transfer files to the build directory
Getting started
Install the plugin:
npm install --save-dev dirtransfer-webpack-pluginAPI
new DirTransferPlugin(patterns: array, [basePaths: object])patterns– array of patterns{ src: 'path', dest: 'path' },src– relative tosrcproperty ofbasePathsobject or tocontextof your config (if the former is missing),dest– relative todestproperty ofbasePathsobject or tocontextof your config (if the former is missing)basePaths(optional) – object{ src: 'base path for src pattern', dest: 'base path for src pattern' },src- individualsrcpath patterns inpatternsarray will be resolved relative to this base path,dest- individualdestpath patterns inpatternsarray 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')
})
]
};0.0.1
10 years ago