Skip to content

Commit 28d9c7b

Browse files
stefanvbnaul
authored andcommitted
Grab latest version of Webpack (and others) (cesium-ml#160)
* Also update npm packages * Specify v2 of webpack * Avoid pip warning; list packages in columns * Try again with webpack * Snapshot most js package versions * Add commands to npm for building bundle and testing * Add commands to npm for building bundle and testing * Update all package versions * Update all npm packages to specified versions * Use newer npm on Travis * Reluctantly add back jQuery, since Bootstrap depends on it * Use npm update instead of home brew tool * Pin jquery
1 parent c1b6e38 commit 28d9c7b

File tree

6 files changed

+59
-78
lines changed

6 files changed

+59
-78
lines changed

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"comment": "off = 0, warn = 1, error = 2",
3+
24
"parser": "babel-eslint",
35
"env": {
46
"browser": true
@@ -25,7 +27,7 @@
2527
"no-class-assign": 0,
2628
"jsx-a11y/label-has-for": 0,
2729
"jsx-a11y/href-no-hash": 1,
28-
"camelcase": 1,
30+
"camelcase": 0,
2931
"no-fallthrough": 0,
3032
"no-restricted-syntax": 1,
3133
"guard-for-in": 1,

.travis/travis_install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ section_end "install.base.requirements"
1313
section "install.cesium.requirements"
1414
pip install -e git://github.com/cesium-ml/cesium.git#egg=cesium
1515
pip install --retries 3 -r requirements.txt
16-
pip list
16+
pip list --format=columns
1717
section_end "install.cesium.requirements"
1818

1919

2020
section "install.cesium_web.requirements"
21+
npm -g install npm@latest
2122
npm --version
2223
node --version
2324
make dependencies

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dev_dependencies:
1212

1313
dependencies:
1414
@./tools/install_deps.py requirements.txt
15-
@./tools/install_npm_deps.py package.json
15+
npm update
1616

1717
db_init:
1818
./tools/db_create.sh
@@ -23,7 +23,7 @@ db_drop:
2323
db_test_data:
2424
PYTHONPATH=. python ./cesium_app/models.py
2525

26-
$(bundle): webpack.config.js
26+
$(bundle): webpack.config.js package.json
2727
$(webpack)
2828

2929
bundle: $(bundle)
@@ -66,3 +66,6 @@ docker-images:
6666
docker build -t cesium/web . && docker push cesium/web
6767
cd docker/postgres && docker build -t cesium/postgres . && docker push cesium/postgres
6868

69+
npm-update:
70+
npm install -g npm-check-updates
71+
ncu

package.json

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,48 @@
22
"name": "Cesium",
33
"license": "BSD-3-Clause",
44
"scripts": {
5-
"build": "webpack"
5+
"build": "make bundle",
6+
"test": "eslint -c .eslintrc --ext .jsx,.js public/scripts/ && make test"
67
},
78
"dependencies": {
9+
"bootstrap": "^3.3.7",
10+
"bootstrap-css": "^3.0.0",
11+
"jquery": "^3.1.1",
12+
"plotly.js": "^1.23.1",
813
"react": "^15.1.0",
9-
"react-addons": "latest",
1014
"react-dom": "^15.1.0",
11-
"react-modal": "latest",
12-
"react-tabs": "latest",
13-
"react-addons-css-transition-group": "latest",
14-
"jquery": "latest",
15-
"jquery-form": "latest",
16-
"bootstrap": "latest",
17-
"bootstrap-css": "latest",
18-
"filter-values": "latest",
19-
"redux": "latest",
20-
"react-redux": "latest",
21-
"redux-thunk": "latest",
22-
"redux-logger": "latest",
23-
"whatwg-fetch": "latest",
15+
"react-redux": "^5.0.3",
16+
"react-tabs": "^0.8.2",
17+
"react-tooltip": "^3.2.7",
18+
"redux": "^3.6.0",
2419
"redux-form": "^5.3.3",
25-
"plotly.js": "latest",
26-
"webpack": "latest",
27-
"react-tooltip": "latest"
20+
"redux-logger": "^2.8.1",
21+
"redux-thunk": "^2.2.0",
22+
"webpack": "^2.2.1",
23+
"webpack-dev-server": "^2.4.1",
24+
"whatwg-fetch": "^2.0.2"
2825
},
2926
"devDependencies": {
30-
"babel": "latest",
31-
"babel-core": "latest",
32-
"babel-eslint": "^6.1.2",
33-
"babel-loader": "latest",
34-
"babel-preset-es2015": "latest",
35-
"babel-preset-react": "latest",
36-
"babel-preset-stage-2": "latest",
37-
"css-loader": "latest",
38-
"cwise": "latest",
39-
"eslint": "latest",
40-
"eslint-config-airbnb": "latest",
41-
"eslint-loader": "latest",
42-
"eslint-plugin-import": "latest",
43-
"eslint-plugin-jsx-a11y": "latest",
44-
"eslint-plugin-react": "latest",
45-
"exports-loader": "latest",
46-
"glslify": "latest",
47-
"ify-loader": "latest",
48-
"imports-loader": "latest",
49-
"style-loader": "latest",
50-
"webpack-dev-server": "latest"
27+
"babel": "^6.23.0",
28+
"babel-core": "^6.23.1",
29+
"babel-eslint": "^7.1.1",
30+
"babel-loader": "^6.3.2",
31+
"babel-preset-es2015": "^6.22.0",
32+
"babel-preset-react": "^6.23.0",
33+
"babel-preset-stage-2": "^6.22.0",
34+
"css-loader": "^0.26.1",
35+
"cwise": "^1.0.9",
36+
"eslint": "^3.16.1",
37+
"eslint-config-airbnb": "^14.1.0",
38+
"eslint-loader": "^1.6.3",
39+
"eslint-plugin-import": "^2.2.0",
40+
"eslint-plugin-jsx-a11y": "^4.0.0",
41+
"eslint-plugin-react": "^6.10.0",
42+
"exports-loader": "^0.6.3",
43+
"glslify": "^6.0.1",
44+
"ify-loader": "^1.0.3",
45+
"imports-loader": "^0.7.0",
46+
"style-loader": "^0.13.1"
5147
},
5248
"browserify": {
5349
"transform": [

tools/install_npm_deps.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

webpack.config.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ const config = {
88
filename: 'bundle.js'
99
},
1010
module: {
11-
loaders: [
11+
rules: [
1212
{ test: /\.js?$/,
1313
exclude: /node_modules/,
1414
loader: 'babel-loader',
15-
query:
15+
options:
1616
{
1717
presets: ['es2015', 'react', 'stage-2'],
1818
compact: false
@@ -21,27 +21,35 @@ const config = {
2121
{ test: /\.jsx?$/,
2222
exclude: /node_modules/,
2323
loader: 'babel-loader',
24-
query:
24+
options:
2525
{
2626
presets: ['es2015', 'react', 'stage-2'],
2727
compact: false
2828
}
2929
},
30-
{ test: /\.css$/, loader: 'style-loader!css-loader' },
30+
{ test: /\.css$/,
31+
use: [
32+
'style-loader',
33+
'css-loader'
34+
]
35+
},
3136
{ test: /node_modules/, loader: 'ify-loader' }
3237
],
3338
},
3439
plugins: [
3540
new webpack.ProvidePlugin({
3641
fetch: 'imports-loader?this=>global!exports-loader?global.fetch!whatwg-fetch'
3742
}),
43+
44+
// We do not use JQuery for anything in this project; but Bootstrap
45+
// depends on it
3846
new webpack.ProvidePlugin({
3947
$: "jquery",
4048
jQuery: "jquery",
41-
}),
49+
})
4250
],
4351
resolve: {
44-
extensions: ['', '.js', '.jsx']
52+
extensions: ['.js', '.jsx']
4553
}
4654
};
4755

0 commit comments

Comments
 (0)