0.0.2 • Published 10 years ago
filetransfer-webpack-plugin v0.0.2
File Transfer Webpack Plugin
Transfer single file to the build directory
Getting started
Install the plugin:
npm install --save-dev filetransfer-webpack-pluginAPI
new FileTransferPlugin(pattern: object, [basePath: string])pattern–{ src: 'path', dest: 'abs_path_of_dest_file' },src– relative tobasePathor tocontextof your config (ifbasePathis not exists),dest– absolute pathbasePath(optional) – directory to be resolved tosrcparameter
Usage
var FileTransferPlugin = require('filetransfer-webpack-plugin');
module.exports = {
context: path.join(__dirname, 'app'),
plugins: [
new FileTransferPlugin({
src: 'cred_dev.js',
dest: path.join(__dirname, 'cred.js')
})
]
};
module.exports = {
plugins: [
new FileTransferPlugin({
src: 'cred_dev.js',
dest: path.join(somePath, 'cred.js')
}, path.join(__dirname, 'app'))
]
};