|
16 | 16 | "node": ">=8" |
17 | 17 | }, |
18 | 18 | "scripts": { |
19 | | - "precommit": "clinton && lint-staged", |
20 | | - "commitmsg": "commitlint --extends=@commitlint/config-angular -e", |
21 | | - "prepublish": "npm run build", |
22 | | - "postpublish": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"build: update changelog\"", |
| 19 | + "version": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"build: update changelog\"", |
| 20 | + |
23 | 21 | "test": "npm run test:e2e", |
24 | 22 | "test:e2e": "npm run build && npm run testcafe", |
25 | 23 | "testcafe": "testcafe all tests/e2e/*-test.js --app \"http-server ./ -s\"", |
26 | | - "html": "node src/build/html.js", |
| 24 | + |
| 25 | + "precommit": "clinton && lint-staged", |
| 26 | + "commitmsg": "commitlint --extends=@commitlint/config-angular -e", |
| 27 | + |
| 28 | + "prepare": "npm run build", |
| 29 | + "build": "npm run css && npm run html", |
| 30 | + "html": "rimraf docs/*.html && posthtml", |
| 31 | + "css": "rimraf {docs,dist}/css/*.css && postcss -o dist/css/slims.min.css src/css/slims.css && cp -a dist/. docs/", |
| 32 | + |
27 | 33 | "coverage": "nyc report --reporter=text-lcov | coveralls", |
28 | | - "css": "postcss --no-map -o dist/css/slims.min.css src/css/slims.css && cp -a dist/. docs/", |
29 | | - "build": "rimraf dist && npm run css && npm run html", |
| 34 | + |
| 35 | + "lint": "eslint {src,test}/*.js *.md --fix", |
| 36 | + "pretest": "clinton && npm run lint", |
| 37 | + |
30 | 38 | "watch:docs": "chokidar src/docs/**/* -c \"npm run html\"", |
31 | 39 | "watch:css": "chokidar src/css/**/* -c \"npm run css\"", |
32 | 40 | "watch": "npm run watch:docs | npm run watch:css", |
|
88 | 96 | "stylelint-config-standard": "^18.3.0", |
89 | 97 | "stylelint-csstree-validator": "^1.4.0", |
90 | 98 | "testcafe": "^1.3.0" |
91 | | - }, |
92 | | - "lint-staged": { |
93 | | - "*.{js,html}": "eslint", |
94 | | - "*.md": "eslint", |
95 | | - "src/**/*.css": "stylelint" |
96 | | - }, |
97 | | - "browserslist": [ |
98 | | - "last 2 versions" |
99 | | - ], |
100 | | - "posthtml": { |
101 | | - "extend": { |
102 | | - "root": "src/docs/" |
103 | | - }, |
104 | | - "modules": { |
105 | | - "root": "src/docs/", |
106 | | - "from": "src/docs/layout/" |
107 | | - } |
108 | | - }, |
109 | | - "postcss": { |
110 | | - "plugins": { |
111 | | - "postcss-devtools": {}, |
112 | | - "stylefmt": {}, |
113 | | - "postcss-easy-import": { |
114 | | - "prefix": "_", |
115 | | - "extensions": ".css" |
116 | | - }, |
117 | | - "postcss-each": {}, |
118 | | - "postcss-mixins": {}, |
119 | | - "postcss-at-rules-variables": {}, |
120 | | - "postcss-for": {}, |
121 | | - "postcss-custom-properties": { |
122 | | - "preserve": false |
123 | | - }, |
124 | | - "postcss-conditionals": {}, |
125 | | - "postcss-nested": {}, |
126 | | - "postcss-calc": { |
127 | | - "precision": 6 |
128 | | - }, |
129 | | - "postcss-flow-root": {}, |
130 | | - "postcss-initial": {}, |
131 | | - "postcss-reduce-initial": {}, |
132 | | - "autoprefixer": {}, |
133 | | - "postcss-sorting": {}, |
134 | | - "postcss-csso": {} |
135 | | - } |
136 | | - }, |
137 | | - "eslintConfig": { |
138 | | - "parser": "babel-eslint", |
139 | | - "plugins": [ |
140 | | - "ava", |
141 | | - "xo", |
142 | | - "babel", |
143 | | - "markdown", |
144 | | - "html" |
145 | | - ], |
146 | | - "extends": [ |
147 | | - "xo", |
148 | | - "plugin:xo/recommended", |
149 | | - "plugin:ava/recommended" |
150 | | - ], |
151 | | - "globals": { |
152 | | - "hljs": true, |
153 | | - "test": true, |
154 | | - "fixture": true |
155 | | - }, |
156 | | - "rules": { |
157 | | - "no-unused-expressions": [ |
158 | | - 0, |
159 | | - { |
160 | | - "allowShortCircuit": true |
161 | | - } |
162 | | - ] |
163 | | - } |
164 | | - }, |
165 | | - "stylelint": { |
166 | | - "rules": { |
167 | | - "function-whitespace-after": null, |
168 | | - "at-rule-no-unknown": null |
169 | | - }, |
170 | | - "plugins": [ |
171 | | - "stylelint-csstree-validator" |
172 | | - ], |
173 | | - "extends": "stylelint-config-standard" |
174 | | - }, |
175 | | - "clinton": { |
176 | | - "ignores": [ |
177 | | - "test/**", |
178 | | - "tmp/**", |
179 | | - "lib/**", |
180 | | - "*.{html,jpg}" |
181 | | - ], |
182 | | - "rules": { |
183 | | - "pkg-main": [ |
184 | | - "off" |
185 | | - ], |
186 | | - "xo": [ |
187 | | - "off" |
188 | | - ], |
189 | | - "ava": [ |
190 | | - "off" |
191 | | - ] |
192 | | - } |
193 | 99 | } |
194 | 100 | } |
0 commit comments