iGitScor / webpack-filesystem-plugin

Filesystem wrapper
MIT License
1 stars 0 forks source link
firstpr-friendly webpack

Webpack filesystem plugin

Filesystem wrapper

Build Status codecov Dependencies dependencies Status devDependencies Status MIT License

Install Instructions

$ npm i webpack-filesystem-plugin

Note: This plugin needs NodeJS >= 6

Usage Instructions

Require webpack-filesystem-plugin

var WebpackFilesystem = require('webpack-filesystem-plugin')

Add the plugin to your plugin list

var config = {
  plugins: [
    new WebpackFilesystem({
      action: 'cp',
      source: 'test.txt',
      dist: 'awesome.txt',
    })
  ]
}

Options

Actions

Common options

Use silent mode

var config = {
  plugins: [
    new WebpackFilesystem({
      silent: true,
      action: 'cp',
      source: 'test.txt',
      dist: 'awesome.txt',
    })
  ]
}
logLevel

Specify behavior when the plugin fail.

Example:

var config = {
  plugins: [
    new WebpackFilesystem({
      silent: true,
      action: 'cp',
      source: 'test.txt',
      dist: 'awesome.txt',
      logLevel: 'log'
      ...
    })
  ]
}

Contributing

All contributions are welcome. Please make a pull request and make sure things still pass after running npm test