0.6.0 • Published 7 years ago

webpack-configure v0.6.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

webpack-configure

Build Status Coverage Status

A webpack config file builder.

Setup

Add the webpack-configure package to your application via npm.

$ npm i -D webpack-configure

Usage

Use webpack-configure inside the webpack.config.js file to generate the config for you:

const webpackConfigure = require('webpack-configure');

module.exports = webpackConfigure();
Options

A list of options can be passed to webpackConfigure(), they are all optional:

NameTypeDefaultDescription
build.namedModulesBooleantrueEnables the NamedModules plugin
build.vendorBooleanfalseCreates a vendor bundle build
devServer.hotBooleantrueEnables hot module reload on the development server
devServer.isEnabledBooleantrueAdds webpack-dev-server as a development server
devServer.logLevelStringerrorThe log level for webpack-dev-server
devServer.portInteger2222The port that webpack-dev-server will listen on
entry.appStringindex.jsxThe main entry file into the application
entry.vendorStringvendor.jsThe main entry file into the vendor build
html.isEnabledBooleantrueWhether an html template must be used
html.templateStringindex.htmlThe location of the html template file
languages.cssBooleantrueWhether CSS is used in the application
languages.javascriptBooleantrueWhether JavaScript is used in the application
languages.jsxBooleantrueWhether JSX is used in the application
languages.sassBooleantrueWhether Sass is used in the application
output.appStringbundle.jsThe name of the output bundle of the application
output.vendorStringvendor.jsThe name of the output file of the vendor bundle
packages.npmBooleantrueWhether npm is used to install packages in the application
packages.reactFlexboxGridBooleantrueWhether a rule for the react-flexbox-grid package is to be loaded
packages.reactToolboxBooleantrueWhether a rule for the react-toolbox package is to be loaded
paths.appStringappThe application folder location
paths.buildStringbuildThe build folder location
paths.rootstring../../../../The path to the root of the application relative to webpack-configure

Contributing

Testing

All tests are run through mocha, with the chai assertion library.

To run the tests (and the linter - more on that below):

$ npm test

To run the tests by themselves without the linter:

$ npm run test:scripts

Linting

Linting is done via eslint on the eslint-config-airbnb configuration.

Linting can be run together with the tests with:

$ npm test

To run linting alone without the tests:

$ npm run lint
0.6.0

7 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.0

7 years ago

0.0.0-semver

7 years ago