Skip to content

Commit d7619c7

Browse files
committed
Update build process
1 parent 4ffdc0c commit d7619c7

File tree

1 file changed

+97
-59
lines changed

1 file changed

+97
-59
lines changed

package.json

Lines changed: 97 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,48 @@
77
"jsnext:main": "dist/module.js",
88
"module": "dist/module.js",
99
"scripts": {
10-
"lint": "eslint webpack.config.babel.js .storybook src stories test/regression test/unit/suite && stylelint src/style.css",
11-
"test": "npm run lint && npm run unit-test && npm run regression-test",
12-
"kill": "fkill node",
10+
"ava:bundle": "ava test/unit/testBundle.js",
11+
"ava:regression": "ava test/regression/suite",
12+
"babel:module": "babel --source-maps -o dist/module.js src/component.js",
13+
"build:module": "run-s create-output-dir babel:module",
14+
"build:test": "webpack --config test/unit/webpack.config.babel.js",
15+
"build": "run-p package min-package build:module",
1316
"clean": "rimraf dist",
14-
"unit-test": "webpack --config test/unit/webpack.config.babel.js && ava test/unit/testBundle.js",
15-
"regression-test": "node test/regression/server.js && ava test/regression/suite",
16-
"regression-test-kill": "npm run regression-test && npm run kill",
17-
"build-module": "mkdirp dist && babel --source-maps -o dist/module.js src/component.js",
18-
"package": "webpack",
17+
"create-output-dir": "mkdirp dist",
18+
"lint:css": "stylelint src/style.css",
19+
"lint:js": "eslint webpack.config.babel.js .storybook src stories test/regression test/unit/suite",
20+
"lint": "run-p lint:js lint:css",
1921
"min-package": "cross-env MIN=true webpack -p",
20-
"build": "npm run package && npm run min-package && npm run build-module",
22+
"package": "webpack",
23+
"prepare": "npm run build",
24+
"regression-suite": "run-s wait-storybook-server ava:regression",
2125
"start": "npm run storybook",
2226
"storybook": "start-storybook -p 6006",
23-
"prepublish": "npm run build"
27+
"test:regression": "node test/regression/startTest.js",
28+
"test:unit": "run-s build:test ava:bundle",
29+
"test": "run-s lint test:unit test:regression",
30+
"wait-storybook-server": "wait-on http-get://localhost:6006"
2431
},
2532
"ava": {
2633
"require": [
27-
"babel-register"
34+
"@babel/register",
35+
"@babel/polyfill"
2836
],
29-
"babel": "inherit"
37+
"babel": {
38+
"testOptions": {
39+
"plugins": [
40+
"@babel/plugin-syntax-jsx"
41+
],
42+
"presets": [
43+
"@babel/preset-env"
44+
]
45+
}
46+
}
3047
},
3148
"babel": {
3249
"presets": [
33-
"es2015",
34-
"react"
50+
"@babel/preset-env",
51+
"@babel/preset-react"
3552
],
3653
"ignore": [
3754
"src/webcomponent"
@@ -41,22 +58,29 @@
4158
"env": {
4259
"browser": true
4360
},
61+
"parser": "babel-eslint",
62+
"parserOptions": {
63+
"ecmaVersion": "2015",
64+
"ecmaFeatures": {
65+
"jsx": true
66+
}
67+
},
4468
"extends": [
4569
"airbnb"
4670
],
71+
"plugins": [
72+
"react",
73+
"import",
74+
"jsx-a11y"
75+
],
4776
"rules": {
4877
"new-cap": "off",
4978
"import/no-extraneous-dependencies": "off",
79+
"import/no-unresolved": "off",
80+
"import/no-self-import": "off",
5081
"react/prop-types": "off",
5182
"react/jsx-filename-extension": "off",
5283
"global-require": "off"
53-
},
54-
"settings": {
55-
"import/resolver": {
56-
"webpack": {
57-
"config": ".storybook/webpack.config.js"
58-
}
59-
}
6084
}
6185
},
6286
"postcss": {
@@ -69,6 +93,13 @@
6993
}
7094
}
7195
},
96+
"greenkeeper": {
97+
"ignore": [
98+
"eslint-config-airbnb",
99+
"eslint-plugin-import",
100+
"eslint-plugin-jsx-a11y"
101+
]
102+
},
72103
"stylelint": {
73104
"extends": "stylelint-config-standard",
74105
"plugins": [
@@ -96,52 +127,59 @@
96127
"browser",
97128
"box"
98129
],
99-
"greenkeeper": {
100-
"ignore": [
101-
"eslint-config-airbnb",
102-
"eslint-plugin-import",
103-
"eslint-plugin-jsx-a11y"
104-
]
105-
},
106130
"author": "Matheus Kautzmann",
107131
"license": "MIT",
108132
"bugs": {
109133
"url": "https://github.com/z-kit/z-box/issues"
110134
},
111135
"homepage": "https://github.com/z-kit/z-box",
112136
"devDependencies": {
113-
"@kadira/storybook": "^2.35.3",
114-
"ava": "^0.18.2",
115-
"babel-cli": "^6.23.0",
116-
"babel-core": "^6.23.1",
117-
"babel-loader": "^6.3.2",
118-
"babel-preset-es2015": "^6.22.0",
119-
"babel-preset-react": "^6.23.0",
120-
"babel-register": "^6.23.0",
121-
"cross-env": "^3.1.4",
122-
"cross-spawn": "^5.1.0",
123-
"css-loader": "^0.26.2",
124-
"eslint": "^3.16.1",
125-
"eslint-config-airbnb": "^12.0.0",
126-
"eslint-import-resolver-webpack": "^0.8.1",
127-
"eslint-plugin-import": "^1.16.0",
128-
"eslint-plugin-jsx-a11y": "^2.2.3",
129-
"eslint-plugin-react": "^6.10.0",
130-
"extract-text-webpack-plugin": "2.0.0",
131-
"fkill-cli": "^3.4.0",
132-
"jsx-test-helpers": "^1.1.0",
137+
"@babel/cli": "^7.1.5",
138+
"@babel/core": "^7.1.6",
139+
"@babel/polyfill": "^7.0.0",
140+
"@babel/preset-env": "^7.1.6",
141+
"@babel/preset-react": "^7.0.0",
142+
"@babel/register": "^7.0.0",
143+
"@babel/runtime": "^7.1.5",
144+
"@storybook/addons": "^v4.0.9",
145+
"@storybook/react": "^v4.0.9",
146+
"acorn": "^6.0.4",
147+
"autoprefixer": "^9.3.1",
148+
"ava": "^1.0.0-rc.2",
149+
"babel-eslint": "^10.0.1",
150+
"babel-loader": "^8.0.4",
151+
"cross-env": "^5.2.0",
152+
"cross-spawn": "^6.0.5",
153+
"css-loader": "^1.0.1",
154+
"cssnano": "^4.1.7",
155+
"enzyme": "^3.7.0",
156+
"enzyme-adapter-react-16": "^1.7.0",
157+
"eslint": "^5.9.0",
158+
"eslint-config-airbnb": "^17.1.0",
159+
"eslint-import-resolver-webpack": "^0.10.1",
160+
"eslint-plugin-import": "^2.14.0",
161+
"eslint-plugin-jsx-a11y": "^6.1.2",
162+
"eslint-plugin-react": "^7.11.1",
163+
"file-loader": "^2.0.0",
164+
"handlebars": "^4.0.12",
165+
"handlebars-loader": "^1.7.0",
166+
"html-webpack-plugin": "^3.2.0",
167+
"mini-css-extract-plugin": "^0.4.5",
133168
"mkdirp": "^0.5.1",
134-
"nightmare": "^2.10.0",
169+
"nightmare": "^3.0.1",
170+
"npm-run-all": "^4.1.5",
135171
"null-loader": "^0.1.1",
136-
"postcss-loader": "^1.3.3",
137-
"react": "^15.4.2",
138-
"react-dom": "^15.4.2",
139-
"rimraf": "^2.6.1",
140-
"style-loader": "^0.13.2",
141-
"stylelint": "^7.9.0",
142-
"stylelint-config-standard": "^16.0.0",
143-
"stylelint-selector-bem-pattern": "^1.0.0",
144-
"webpack": "^2.2.1",
145-
"webpack-node-externals": "^1.5.4"
172+
"postcss-loader": "^3.0.0",
173+
"react": "^16.6.3",
174+
"react-dom": "^16.6.3",
175+
"rimraf": "^2.6.2",
176+
"style-loader": "^0.23.1",
177+
"stylelint": "^9.9.0",
178+
"stylelint-config-standard": "^18.2.0",
179+
"stylelint-selector-bem-pattern": "^2.0.0",
180+
"wait-on": "^3.2.0",
181+
"webpack": "^4.26.1",
182+
"webpack-cli": "^3.1.2",
183+
"webpack-node-externals": "^1.7.2"
146184
}
147185
}

0 commit comments

Comments
 (0)