Skip to content

Commit 130bb85

Browse files
committed
use strict versions
1 parent 0632710 commit 130bb85

File tree

4 files changed

+46
-43
lines changed

4 files changed

+46
-43
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ gradlew*
1010
**/*.ipr
1111
**/*.iml
1212
**/*.iws
13+
yarn.lock
14+
package-lock.json

src/main/resources/templates/index.hbs

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
<script src="{{springMacroRequestContext.request.contextPath}}/app.js"></script>
1212
<!-- 2) up and running dynamic part of application after it static initial page was loader -->
1313
<script type="text/javascript">
14-
$(function() {
15-
renderClient({{{json}}});
16-
});
14+
(function() {
15+
document.addEventListener('DOMContentLoaded', function onDOMContentLoaded() {
16+
renderClient();
17+
}, false);
18+
})();
1719
</script>
1820
</body>
1921
</html>

ui/config/webpack.config.babel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const config = {
2929
include,
3030
loader: 'babel',
3131
query: {
32-
presets: ['stage-0', 'es2015', 'react'],
32+
presets: ['env', 'react', 'stage-0'],
3333
plugins: ['react-html-attrs', 'add-module-exports', 'transform-class-properties']
3434
}
3535
}, {

ui/package.json

+38-39
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
"main": "./src/main.js",
66
"scripts": {
77
"i": "npm i --no-optional",
8-
98
"prebuild": "npm run i",
109
"build:clean": "rimraf -rf ../src/main/resources/static/**/*.{js,html}",
11-
"build:compile": "NODE_ENV=production webpack --config ./config/webpack.config.production.babel.js -c --process -p",
10+
"build:compile": "cross-env NODE_ENV=production webpack --config ./config/webpack.config.production.babel.js -c --process -p",
1211
"build": "npm-run-all build:*",
13-
1412
"prestart": "npm run i",
1513
"start": "webpack-dev-server -d --config ./config/webpack.config.babel.js --content-base=../src/main/resources/static",
16-
1714
"serve": "json-server ../src/main/resources/static/db.json -d 500 -w -p 3000 --static ../src/main/resources/static",
1815
"webpack:watch": "webpack -w --config ./config/webpack.config.babel.js -c --process",
1916
"webpack:compile": "webpack --config ./config/webpack.config.babel.js -c --process"
@@ -28,46 +25,48 @@
2825
"author": "Maksim Kostromin",
2926
"license": "ISC",
3027
"devDependencies": {
31-
"autoprefixer": "*",
32-
"babel-cli": "*",
33-
"babel-loader": "*",
34-
"babel-plugin-add-module-exports": "*",
35-
"babel-plugin-react-html-attrs": "*",
36-
"babel-plugin-transform-class-properties": "*",
37-
"babel-preset-es2015": "*",
38-
"babel-preset-react": "*",
39-
"babel-preset-stage-0": "*",
40-
"babel-register": "*",
41-
"css-loader": "*",
42-
"extract-text-webpack-plugin": "*",
43-
"file-loader": "*",
44-
"handlebars": "*",
45-
"handlebars-loader": "*",
46-
"html-webpack-plugin": "*",
47-
"json-server": "*",
48-
"less": "*",
49-
"less-loader": "*",
50-
"npm-run-all": "*",
51-
"opn-cli": "*",
52-
"postcss-loader": "*",
53-
"rimraf": "*",
54-
"source-map-loader": "*",
55-
"style-loader": "*",
56-
"url-loader": "*",
57-
"webpack": "*",
58-
"webpack-dev-server": "*"
28+
"autoprefixer": "6.7.7",
29+
"babel-cli": "6.24.0",
30+
"babel-loader": "6.4.1",
31+
"babel-plugin-add-module-exports": "0.2.1",
32+
"babel-plugin-react-html-attrs": "2.0.0",
33+
"babel-plugin-transform-class-properties": "6.23.0",
34+
"babel-preset-env": "1.2.2",
35+
"babel-preset-react": "6.23.0",
36+
"babel-preset-stage-0": "6.22.0",
37+
"babel-register": "6.24.0",
38+
"cross-env": "3.2.4",
39+
"css-loader": "0.27.3",
40+
"extract-text-webpack-plugin": "<2",
41+
"file-loader": "0.10.1",
42+
"handlebars": "4.0.6",
43+
"handlebars-loader": "1.4.0",
44+
"html-webpack-plugin": "2.28.0",
45+
"less": "2.7.2",
46+
"less-loader": "4.0.2",
47+
"npm-run-all": "4.1.1",
48+
"opn-cli": "3.1.0",
49+
"postcss-loader": "1.3.3",
50+
"rimraf": "2.6.1",
51+
"source-map-loader": "0.2.0",
52+
"style-loader": "0.16.0",
53+
"url-loader": "0.5.8",
54+
"webpack": "<2",
55+
"webpack-dev-server": "<2"
5956
},
6057
"dependencies": {
61-
"bootstrap": "*",
62-
"jquery": "*",
63-
"react": "*",
64-
"react-dom": "*"
58+
"babel-polyfill": "6.23.0",
59+
"bootstrap": "3.3.7",
60+
"jquery": "3.2.1",
61+
"react": "15.4.2",
62+
"react-dom": "15.4.2",
63+
"react-router": "<4.0.0"
6564
},
6665
"babel": {
6766
"presets": [
68-
"stage-0",
69-
"es2015",
70-
"react"
67+
"env",
68+
"react",
69+
"stage-0"
7170
],
7271
"plugins": [
7372
"react-html-attrs",

0 commit comments

Comments
 (0)