✨ Simplification du webpack de test
parent
ca55e75abb
commit
df06bb740f
10
package.json
10
package.json
|
@ -104,11 +104,11 @@
|
|||
"start": "node source/server.js",
|
||||
"externalize": "node source/externalize.js",
|
||||
"compile": "webpack --config source/webpack.prod.js",
|
||||
"test": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/**/*.test.js\"",
|
||||
"test-watch": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/**/*.test.js\" --watch",
|
||||
"test-meca": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js test/mecanisms.test.js --watch",
|
||||
"test-rules": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js test/real-rules.test.js --watch",
|
||||
"test-inversions": "mocha-webpack --webpack-config source/webpack.test.config.js --require source-map-support/register --require test/helpers/browser.js \"test/inversion.test.js\" --watch",
|
||||
"test": "mocha-webpack --webpack-config source/webpack.test.js --require source-map-support/register --require test/helpers/browser.js \"test/**/*.test.js\"",
|
||||
"test-watch": "mocha-webpack --webpack-config source/webpack.test.js --require source-map-support/register --require test/helpers/browser.js \"test/**/*.test.js\" --watch",
|
||||
"test-meca": "mocha-webpack --webpack-config source/webpack.test.js --require source-map-support/register --require test/helpers/browser.js test/mecanisms.test.js --watch",
|
||||
"test-rules": "mocha-webpack --webpack-config source/webpack.test.js --require source-map-support/register --require test/helpers/browser.js test/real-rules.test.js --watch",
|
||||
"test-inversions": "mocha-webpack --webpack-config source/webpack.test.js --require source-map-support/register --require test/helpers/browser.js \"test/inversion.test.js\" --watch",
|
||||
"heroku-postbuild": "yarn install --production=false && yarn compile"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
var webpack = require('webpack'),
|
||||
path = require('path')
|
||||
|
||||
module.exports = {
|
||||
devtool: 'cheap-module-source-map',
|
||||
resolve: {
|
||||
alias: {
|
||||
Engine: path.resolve('source/engine/'),
|
||||
Règles: path.resolve('source/règles/'),
|
||||
Components: path.resolve('source/components/')
|
||||
}
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
// slow : ~ 1s
|
||||
test: /\.css$/,
|
||||
loader: 'ignore-loader'
|
||||
},
|
||||
{
|
||||
test: /\.html$/,
|
||||
loader: 'ignore-loader'
|
||||
},
|
||||
{
|
||||
test: /\.yaml$/,
|
||||
loader: 'json-loader!yaml-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader'
|
||||
},
|
||||
{
|
||||
test: /\.csv$/,
|
||||
loader: 'csv-loader',
|
||||
options: {
|
||||
dynamicTyping: true,
|
||||
header: true,
|
||||
skipEmptyLines: true
|
||||
}
|
||||
},
|
||||
{
|
||||
//slow : ~ 3 seconds
|
||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||
loader: 'ignore-loader'
|
||||
},
|
||||
{
|
||||
test: /\.ne$/,
|
||||
loader: 'babel-loader!nearley-loader'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
var webpack = require('webpack'),
|
||||
path = require('path'),
|
||||
HardSourceWebpackPlugin = require('hard-source-webpack-plugin'),
|
||||
common = require('./webpack.common.js')
|
||||
|
||||
module.exports = {
|
||||
...common,
|
||||
mode: 'development',
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({ NODE_ENV: 'development' }),
|
||||
new HardSourceWebpackPlugin()
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue