Skip to content

Commit

Permalink
Fixes AdeleD#157 AdeleD#149 AdeleD#188 Update dev dependencies
Browse files Browse the repository at this point in the history
Use Webpack v4 and last Babel versions
  • Loading branch information
MonsieurV committed Mar 16, 2018
1 parent 083a1bd commit 1d783cd
Show file tree
Hide file tree
Showing 5 changed files with 2,806 additions and 294 deletions.
8 changes: 4 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
"react",
"es2015",
"stage-0"
]
"env",
"react"
],
"plugins": ["transform-class-properties"]
}
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
.PHONY: install
install:
@npm install
npm install

.PHONY: test
test:
@npm test
npm test

.PHONY: demo
demo:
cd demo && npm run demo
node demo/data.js
npm run demo

.PHONY: serve
serve:
node demo/server.js
npm run demo
30 changes: 12 additions & 18 deletions demo/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* global __dirname */

var path = require('path');
const path = require('path');
const webpack = require('webpack');

var webpack = require('webpack');

var dir_js = path.resolve(__dirname, 'js');
var dir_html = path.resolve(__dirname, 'html');
var dir_build = path.resolve(__dirname, 'build');
const dir_js = path.resolve(__dirname, 'js');
const dir_html = path.resolve(__dirname, 'html');
const dir_build = path.resolve(__dirname, 'build');

module.exports = {
entry: path.resolve(dir_js, 'demo.js'),
Expand All @@ -19,24 +18,18 @@ module.exports = {
contentBase: dir_build,
},
module: {
loaders: [
rules: [
{
loader: 'react-hot-loader/webpack',
use: 'react-hot-loader/webpack',
test: dir_js,
},
{
loader: 'babel-loader',
test: dir_js,
query: {
presets: ['es2015', 'react', 'stage-0'],
},
use: 'babel-loader',
test: dir_js
},
{
loader: 'babel-loader',
test: path.join(__dirname, '..', 'react_components'),
query: {
presets: ['es2015', 'react', 'stage-0'],
},
use: 'babel-loader',
test: path.join(__dirname, '..', 'react_components')
}
]
},
Expand All @@ -49,4 +42,5 @@ module.exports = {
colors: true
},
devtool: 'source-map',
mode: 'development'
};
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,30 @@
"react": "^16.0.0"
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-jest": "^17.0.2",
"babel-loader": "^6.2.8",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-jest": "^23.0.0-alpha.0",
"babel-loader": "^7.1.4",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"express": "^4.14.0",
"jest-cli": "^17.0.3",
"jquery": "^3.1.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-hot-loader": "^3.0.0",
"serve-static": "^1.11.1",
"webpack": "^1.13.3",
"webpack-dev-middleware": "^1.8.4",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.12",
"webpack-dev-middleware": "^3.0.1",
"webpack-dev-server": "^1.16.2"
},
"scripts": {
"test": "BABEL_JEST_STAGE=0 jest",
"prepublish": "babel ./react_components --out-dir ./dist --source-maps --presets es2015,stage-0,react",
"prepublish": "babel ./react_components --out-dir ./dist --source-maps",
"start": "webpack-dev-server --hot --inline",
"demo": "webpack --config demo/webpack.config.js && node demo/data.js && node demo/server.js"
"demo": "webpack --config demo/webpack.config.js --mode=development && node demo/data.js && node demo/server.js"
},
"jest": {
"transform": {
Expand Down
Loading

0 comments on commit 1d783cd

Please sign in to comment.