Skip to content

Commit 8224bcc

Browse files
committed
[dev] updating scripts and wepback config; lint
1 parent 5669294 commit 8224bcc

File tree

5 files changed

+11
-17
lines changed

5 files changed

+11
-17
lines changed

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"extends": "eslint:recommended",
1212
"parserOptions": {
13+
"ecmaVersion": 2018,
1314
"sourceType": "module",
1415
"ecmaFeatures": {
1516
"jsx": true,

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
22
codebase/
3+
dist/
34
node_modules/
45
*.log

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"lint": "eslint sources/",
9-
"build": "webpack --env.production true",
10-
"module": "webpack --env.production true --env.module true",
11-
"standalone": "webpack --env.production true --env.module true --env.standalone true",
12-
"start": "webpack-dev-server --host 0.0.0.0"
9+
"build": "webpack --mode=production",
10+
"module": "webpack --mode=production --env module",
11+
"standalone": "webpack --mode=production --env module --env standalone",
12+
"start": "webpack-dev-server --mode=development --host 0.0.0.0"
1313
},
1414
"keywords": [
1515
"webix",

sources/views/gradesradar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ export default class GradesRadarView extends JetView {
2323
};
2424
}
2525
init(view){
26-
this.on(this.app,"student:select", id => view.parse(getGrades(id)))
26+
this.on(this.app,"student:select", id => view.parse(getGrades(id)));
2727
}
2828
}

webpack.config.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
var path = require("path");
22
var webpack = require("webpack");
33

4-
module.exports = function(env) {
4+
module.exports = function(env, settings) {
55

66
var pack = require("./package.json");
77
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
88

9-
var production = !!(env && env.production === "true");
10-
var asmodule = !!(env && env.module === "true");
11-
var standalone = !!(env && env.standalone === "true");
9+
var production = settings.mode === "production";
10+
var asmodule = !!(env && env.module);
11+
var standalone = !!(env && env.standalone);
1212

1313
var babelSettings = {
1414
extends: path.join(__dirname, '/.babelrc')
@@ -57,14 +57,6 @@ module.exports = function(env) {
5757
]
5858
};
5959

60-
if (production) {
61-
config.plugins.push(
62-
new webpack.optimize.UglifyJsPlugin({
63-
test: /\.js$/
64-
})
65-
);
66-
}
67-
6860
if (asmodule){
6961
if (!standalone){
7062
config.externals = config.externals || {};

0 commit comments

Comments
 (0)