Skip to content

Commit dc16209

Browse files
authored
refactor[core]: use webpack-dev-server now (PanJiaChen#355)
* bump deps: update vue-splitpane version * refactor[chore]: use webpack-dev-serve build * perf:settings * doc: uodate readme
1 parent 8fd786c commit dc16209

30 files changed

+737
-579
lines changed

.babelrc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"presets": [
33
["env", {
4-
"modules": false
4+
"modules": false,
5+
"targets": {
6+
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7+
}
58
}],
69
"stage-2"
710
],
8-
"plugins": ["transform-runtime"],
9-
"comments": false
11+
"plugins": ["transform-vue-jsx", "transform-runtime"]
1012
}

.eslintrc.js

Lines changed: 196 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,199 @@
11
module.exports = {
2-
root: true,
3-
parser: 'babel-eslint',
4-
parserOptions: {
5-
sourceType: 'module'
6-
},
7-
env: {
8-
browser: true,
9-
node: true,
10-
es6: true,
11-
},
12-
extends: 'eslint:recommended',
13-
// required to lint *.vue files
14-
plugins: [
15-
'html'
16-
],
17-
// check if imports actually resolve
18-
'settings': {
19-
'import/resolver': {
20-
'webpack': {
21-
'config': 'build/webpack.base.conf.js'
22-
}
23-
}
24-
},
25-
// add your custom rules here
26-
//it is base on https://github.com/vuejs/eslint-config-vue
27-
'rules': {
28-
'accessor-pairs': 2,
29-
'arrow-spacing': [2, { 'before': true, 'after': true }],
30-
'block-spacing': [2, 'always'],
31-
'brace-style': [2, '1tbs', { 'allowSingleLine': true }],
32-
'camelcase': [0, { 'properties': 'always' }],
33-
'comma-dangle': [2, 'never'],
34-
'comma-spacing': [2, { 'before': false, 'after': true }],
35-
'comma-style': [2, 'last'],
36-
'constructor-super': 2,
37-
'curly': [2, 'multi-line'],
38-
'dot-location': [2, 'property'],
39-
'eol-last': 2,
40-
'eqeqeq': [2, 'allow-null'],
41-
'generator-star-spacing': [2, { 'before': true, 'after': true }],
42-
'handle-callback-err': [2, '^(err|error)$' ],
43-
'indent': [2, 2, { 'SwitchCase': 1 }],
44-
'jsx-quotes': [2, 'prefer-single'],
45-
'key-spacing': [2, { 'beforeColon': false, 'afterColon': true }],
46-
'keyword-spacing': [2, { 'before': true, 'after': true }],
47-
'new-cap': [2, { 'newIsCap': true, 'capIsNew': false }],
48-
'new-parens': 2,
49-
'no-array-constructor': 2,
50-
'no-caller': 2,
51-
'no-console': 'off',
52-
'no-class-assign': 2,
53-
'no-cond-assign': 2,
54-
'no-const-assign': 2,
55-
'no-control-regex': 0,
56-
'no-delete-var': 2,
57-
'no-dupe-args': 2,
58-
'no-dupe-class-members': 2,
59-
'no-dupe-keys': 2,
60-
'no-duplicate-case': 2,
61-
'no-empty-character-class': 2,
62-
'no-empty-pattern': 2,
63-
'no-eval': 2,
64-
'no-ex-assign': 2,
65-
'no-extend-native': 2,
66-
'no-extra-bind': 2,
67-
'no-extra-boolean-cast': 2,
68-
'no-extra-parens': [2, 'functions'],
69-
'no-fallthrough': 2,
70-
'no-floating-decimal': 2,
71-
'no-func-assign': 2,
72-
'no-implied-eval': 2,
73-
'no-inner-declarations': [2, 'functions'],
74-
'no-invalid-regexp': 2,
75-
'no-irregular-whitespace': 2,
76-
'no-iterator': 2,
77-
'no-label-var': 2,
78-
'no-labels': [2, { 'allowLoop': false, 'allowSwitch': false }],
79-
'no-lone-blocks': 2,
80-
'no-mixed-spaces-and-tabs': 2,
81-
'no-multi-spaces': 2,
82-
'no-multi-str': 2,
83-
'no-multiple-empty-lines': [2, { 'max': 1 }],
84-
'no-native-reassign': 2,
85-
'no-negated-in-lhs': 2,
86-
'no-new-object': 2,
87-
'no-new-require': 2,
88-
'no-new-symbol': 2,
89-
'no-new-wrappers': 2,
90-
'no-obj-calls': 2,
91-
'no-octal': 2,
92-
'no-octal-escape': 2,
93-
'no-path-concat': 2,
94-
'no-proto': 2,
95-
'no-redeclare': 2,
96-
'no-regex-spaces': 2,
97-
'no-return-assign': [2, 'except-parens'],
98-
'no-self-assign': 2,
99-
'no-self-compare': 2,
100-
'no-sequences': 2,
101-
'no-shadow-restricted-names': 2,
102-
'no-spaced-func': 2,
103-
'no-sparse-arrays': 2,
104-
'no-this-before-super': 2,
105-
'no-throw-literal': 2,
106-
'no-trailing-spaces': 2,
107-
'no-undef': 2,
108-
'no-undef-init': 2,
109-
'no-unexpected-multiline': 2,
110-
'no-unmodified-loop-condition': 2,
111-
'no-unneeded-ternary': [2, { 'defaultAssignment': false }],
112-
'no-unreachable': 2,
113-
'no-unsafe-finally': 2,
114-
'no-unused-vars': [2, { 'vars': 'all', 'args': 'none' }],
115-
'no-useless-call': 2,
116-
'no-useless-computed-key': 2,
117-
'no-useless-constructor': 2,
118-
'no-useless-escape': 0,
119-
'no-whitespace-before-property': 2,
120-
'no-with': 2,
121-
'one-var': [2, { 'initialized': 'never' }],
122-
'operator-linebreak': [2, 'after', { 'overrides': { '?': 'before', ':': 'before' } }],
123-
'padded-blocks': [2, 'never'],
124-
'quotes': [2, 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
125-
'semi': [2, 'never'],
126-
'semi-spacing': [2, { 'before': false, 'after': true }],
127-
'space-before-blocks': [2, 'always'],
128-
'space-before-function-paren': [2, 'never'],
129-
'space-in-parens': [2, 'never'],
130-
'space-infix-ops': 2,
131-
'space-unary-ops': [2, { 'words': true, 'nonwords': false }],
132-
'spaced-comment': [2, 'always', { 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] }],
133-
'template-curly-spacing': [2, 'never'],
134-
'use-isnan': 2,
135-
'valid-typeof': 2,
136-
'wrap-iife': [2, 'any'],
137-
'yield-star-spacing': [2, 'both'],
138-
'yoda': [2, 'never'],
139-
'prefer-const': 2,
140-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
141-
'object-curly-spacing': [2, 'always', { objectsInObjects: false }],
142-
'array-bracket-spacing': [2, 'never']
2+
root: true,
3+
parser: 'babel-eslint',
4+
parserOptions: {
5+
sourceType: 'module'
6+
},
7+
env: {
8+
browser: true,
9+
node: true,
10+
es6: true,
11+
},
12+
extends: 'eslint:recommended',
13+
// required to lint *.vue files
14+
plugins: [
15+
'html'
16+
],
17+
// check if imports actually resolve
18+
'settings': {
19+
'import/resolver': {
20+
'webpack': {
21+
'config': 'build/webpack.base.conf.js'
22+
}
14323
}
24+
},
25+
// add your custom rules here
26+
//it is base on https://github.com/vuejs/eslint-config-vue
27+
'rules': {
28+
'accessor-pairs': 2,
29+
'arrow-spacing': [2, {
30+
'before': true,
31+
'after': true
32+
}],
33+
'block-spacing': [2, 'always'],
34+
'brace-style': [2, '1tbs', {
35+
'allowSingleLine': true
36+
}],
37+
'camelcase': [0, {
38+
'properties': 'always'
39+
}],
40+
'comma-dangle': [2, 'never'],
41+
'comma-spacing': [2, {
42+
'before': false,
43+
'after': true
44+
}],
45+
'comma-style': [2, 'last'],
46+
'constructor-super': 2,
47+
'curly': [2, 'multi-line'],
48+
'dot-location': [2, 'property'],
49+
'eol-last': 2,
50+
'eqeqeq': [2, 'allow-null'],
51+
'generator-star-spacing': [2, {
52+
'before': true,
53+
'after': true
54+
}],
55+
'handle-callback-err': [2, '^(err|error)$'],
56+
'indent': [2, 2, {
57+
'SwitchCase': 1
58+
}],
59+
'jsx-quotes': [2, 'prefer-single'],
60+
'key-spacing': [2, {
61+
'beforeColon': false,
62+
'afterColon': true
63+
}],
64+
'keyword-spacing': [2, {
65+
'before': true,
66+
'after': true
67+
}],
68+
'new-cap': [2, {
69+
'newIsCap': true,
70+
'capIsNew': false
71+
}],
72+
'new-parens': 2,
73+
'no-array-constructor': 2,
74+
'no-caller': 2,
75+
'no-console': 'off',
76+
'no-class-assign': 2,
77+
'no-cond-assign': 2,
78+
'no-const-assign': 2,
79+
'no-control-regex': 0,
80+
'no-delete-var': 2,
81+
'no-dupe-args': 2,
82+
'no-dupe-class-members': 2,
83+
'no-dupe-keys': 2,
84+
'no-duplicate-case': 2,
85+
'no-empty-character-class': 2,
86+
'no-empty-pattern': 2,
87+
'no-eval': 2,
88+
'no-ex-assign': 2,
89+
'no-extend-native': 2,
90+
'no-extra-bind': 2,
91+
'no-extra-boolean-cast': 2,
92+
'no-extra-parens': [2, 'functions'],
93+
'no-fallthrough': 2,
94+
'no-floating-decimal': 2,
95+
'no-func-assign': 2,
96+
'no-implied-eval': 2,
97+
'no-inner-declarations': [2, 'functions'],
98+
'no-invalid-regexp': 2,
99+
'no-irregular-whitespace': 2,
100+
'no-iterator': 2,
101+
'no-label-var': 2,
102+
'no-labels': [2, {
103+
'allowLoop': false,
104+
'allowSwitch': false
105+
}],
106+
'no-lone-blocks': 2,
107+
'no-mixed-spaces-and-tabs': 2,
108+
'no-multi-spaces': 2,
109+
'no-multi-str': 2,
110+
'no-multiple-empty-lines': [2, {
111+
'max': 1
112+
}],
113+
'no-native-reassign': 2,
114+
'no-negated-in-lhs': 2,
115+
'no-new-object': 2,
116+
'no-new-require': 2,
117+
'no-new-symbol': 2,
118+
'no-new-wrappers': 2,
119+
'no-obj-calls': 2,
120+
'no-octal': 2,
121+
'no-octal-escape': 2,
122+
'no-path-concat': 2,
123+
'no-proto': 2,
124+
'no-redeclare': 2,
125+
'no-regex-spaces': 2,
126+
'no-return-assign': [2, 'except-parens'],
127+
'no-self-assign': 2,
128+
'no-self-compare': 2,
129+
'no-sequences': 2,
130+
'no-shadow-restricted-names': 2,
131+
'no-spaced-func': 2,
132+
'no-sparse-arrays': 2,
133+
'no-this-before-super': 2,
134+
'no-throw-literal': 2,
135+
'no-trailing-spaces': 2,
136+
'no-undef': 2,
137+
'no-undef-init': 2,
138+
'no-unexpected-multiline': 2,
139+
'no-unmodified-loop-condition': 2,
140+
'no-unneeded-ternary': [2, {
141+
'defaultAssignment': false
142+
}],
143+
'no-unreachable': 2,
144+
'no-unsafe-finally': 2,
145+
'no-unused-vars': [2, {
146+
'vars': 'all',
147+
'args': 'none'
148+
}],
149+
'no-useless-call': 2,
150+
'no-useless-computed-key': 2,
151+
'no-useless-constructor': 2,
152+
'no-useless-escape': 0,
153+
'no-whitespace-before-property': 2,
154+
'no-with': 2,
155+
'one-var': [2, {
156+
'initialized': 'never'
157+
}],
158+
'operator-linebreak': [2, 'after', {
159+
'overrides': {
160+
'?': 'before',
161+
':': 'before'
162+
}
163+
}],
164+
'padded-blocks': [2, 'never'],
165+
'quotes': [2, 'single', {
166+
'avoidEscape': true,
167+
'allowTemplateLiterals': true
168+
}],
169+
'semi': [2, 'never'],
170+
'semi-spacing': [2, {
171+
'before': false,
172+
'after': true
173+
}],
174+
'space-before-blocks': [2, 'always'],
175+
'space-before-function-paren': [2, 'never'],
176+
'space-in-parens': [2, 'never'],
177+
'space-infix-ops': 2,
178+
'space-unary-ops': [2, {
179+
'words': true,
180+
'nonwords': false
181+
}],
182+
'spaced-comment': [2, 'always', {
183+
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
184+
}],
185+
'template-curly-spacing': [2, 'never'],
186+
'use-isnan': 2,
187+
'valid-typeof': 2,
188+
'wrap-iife': [2, 'any'],
189+
'yield-star-spacing': [2, 'both'],
190+
'yoda': [2, 'never'],
191+
'prefer-const': 2,
192+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
193+
'object-curly-spacing': [2, 'always', {
194+
objectsInObjects: false
195+
}],
196+
'array-bracket-spacing': [2, 'never']
197+
}
144198
}
199+

.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22
node_modules/
33
dist/
44
gifs/
5-
npm-debug.log
5+
npm-debug.log*
6+
yarn-debug.log*
7+
yarn-error.log*
8+
69
test/unit/coverage
710
test/e2e/reports
811
selenium-debug.log
12+
13+
# Editor directories and files
914
.idea
15+
.vscode
16+
*.suo
17+
*.ntvs*
18+
*.njsproj
19+
*.sln
20+
1021
package-lock.json

.postcssrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module.exports = {
44
"plugins": {
55
// to edit target browsers: use "browserslist" field in package.json
6+
"postcss-import": {},
67
"autoprefixer": {}
78
}
89
}

0 commit comments

Comments
 (0)