diff --git a/packages/neutrino-preset-airbnb-base/README.md b/packages/neutrino-preset-airbnb-base/README.md new file mode 100644 index 0000000..9c1ea4a --- /dev/null +++ b/packages/neutrino-preset-airbnb-base/README.md @@ -0,0 +1,12 @@ +# Neutrino Airbnb Preset [![NPM version][npm-image]][npm-url] + +`neutrino-preset-airbnb-base` is a Neutrino preset that supports linting JavaScript projects with Airbnb's base ESLint +config, following the [Airbnb styleguide](https://github.com/airbnb/javascript). + +## Documentation + +See the [Neutrino docs](http://neutrino.js.org/presets/neutrino-preset-airbnb-base/) +for details on installation, getting started, usage, and customizing. + +[npm-image]: https://badge.fury.io/js/neutrino-preset-airbnb-base.svg +[npm-url]: https://npmjs.org/package/neutrino-preset-airbnb-base diff --git a/packages/neutrino-preset-web/package.json b/packages/neutrino-preset-web/package.json index 76663e5..81af295 100644 --- a/packages/neutrino-preset-web/package.json +++ b/packages/neutrino-preset-web/package.json @@ -13,8 +13,8 @@ "dependencies": { "babel-core": "^6.22.1", "babel-loader": "^6.2.10", - "babel-preset-babili": "^0.0.11", "babel-preset-env": "^1.1.8", + "babili-webpack-plugin": "^0.0.10", "clean-webpack-plugin": "^0.1.15", "copy-webpack-plugin": "4.0.1", "css-loader": "^0.26.1", diff --git a/packages/neutrino-preset-web/src/index.js b/packages/neutrino-preset-web/src/index.js index f1279f9..4b87f14 100644 --- a/packages/neutrino-preset-web/src/index.js +++ b/packages/neutrino-preset-web/src/index.js @@ -8,6 +8,7 @@ const path = require('path'); const CopyPlugin = require('copy-webpack-plugin'); const CleanPlugin = require('clean-webpack-plugin'); const ProgressBarPlugin = require('progress-bar-webpack-plugin'); +const BabiliPlugin = require('babili-webpack-plugin'); const CWD = process.cwd(); const SRC = path.join(CWD, 'src'); @@ -135,12 +136,7 @@ module.exports = ({ config }) => { ] } }] - ], - env: { - production: { - presets: [require.resolve('babel-preset-babili')] - } - } + ] }); if (config.module.rules.has('lint')) { @@ -235,5 +231,9 @@ module.exports = ({ config }) => { config .plugin('clean') .use(CleanPlugin, [BUILD], { root: CWD }); + + config + .plugin('minify') + .use(BabiliPlugin) } }; diff --git a/packages/neutrino-preset-web/yarn.lock b/packages/neutrino-preset-web/yarn.lock index 6f0d3aa..7c0c49b 100644 --- a/packages/neutrino-preset-web/yarn.lock +++ b/packages/neutrino-preset-web/yarn.lock @@ -801,6 +801,14 @@ babel-types@^6.19.0, babel-types@^6.22.0: lodash "^4.2.0" to-fast-properties "^1.0.1" +babili-webpack-plugin@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/babili-webpack-plugin/-/babili-webpack-plugin-0.0.10.tgz#4b4daed0aa0868541bab9724f690574600cd639b" + dependencies: + babel-core "^6.22.1" + babel-preset-babili "^0.0.11" + webpack-sources "^0.1.4" + babylon@^6.11.0, babylon@^6.15.0: version "6.15.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e"