filetransfer-webpack-plugin
v0.0.2
Published
transfer a file to the build directory
Downloads
1
Maintainers
Readme
File Transfer Webpack Plugin
Transfer single file to the build directory
Getting started
Install the plugin:
npm install --save-dev filetransfer-webpack-plugin
API
new FileTransferPlugin(pattern: object, [basePath: string])
pattern
–{ src: 'path', dest: 'abs_path_of_dest_file' }
,src
– relative tobasePath
or tocontext
of your config (ifbasePath
is not exists),dest
– absolute pathbasePath
(optional) – directory to be resolved tosrc
parameter
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'))
]
};