|
4 | 4 | "version": "0.0.0",
|
5 | 5 | "license": "MIT",
|
6 | 6 | "scripts": {
|
7 |
| - "start": |
8 |
| - "if-env NODE_ENV=production && npm run -s serve || npm run -s dev", |
| 7 | + "start": "per-env", |
| 8 | + "start:production": "npm run -s serve", |
| 9 | + "start:development": "npm run -s dev", |
9 | 10 | "build": "preact build",
|
10 | 11 | "serve": "preact build && preact serve",
|
11 | 12 | "dev": "preact watch",
|
|
14 | 15 | "precommit": "lint-staged"
|
15 | 16 | },
|
16 | 17 | "lint-staged": {
|
17 |
| - "*.{js,jsx,css,md,scss}": ["prettier --write", "git add"], |
18 |
| - "*.{ts,tsx}": ["tslint --fix", "git add"] |
| 18 | + "*.{js,jsx,css,md,scss}": [ |
| 19 | + "prettier --write", |
| 20 | + "git add" |
| 21 | + ], |
| 22 | + "*.{ts,tsx}": [ |
| 23 | + "tslint --fix", |
| 24 | + "git add" |
| 25 | + ] |
19 | 26 | },
|
20 | 27 | "eslintConfig": {
|
21 | 28 | "extends": "eslint-config-aerian"
|
22 | 29 | },
|
23 |
| - "eslintIgnore": ["build/*"], |
| 30 | + "eslintIgnore": [ |
| 31 | + "build/*" |
| 32 | + ], |
24 | 33 | "devDependencies": {
|
25 | 34 | "@types/jest": "^23.3.10",
|
26 | 35 | "husky": "^1.2.0",
|
27 | 36 | "identity-obj-proxy": "^3.0.0",
|
28 |
| - "if-env": "^1.0.0", |
29 | 37 | "jest": "^23.6.0",
|
30 | 38 | "lint-staged": "^8.1.0",
|
| 39 | + "per-env": "^1.0.2", |
31 | 40 | "preact-cli": "^2.2.1",
|
32 | 41 | "preact-render-spy": "^1.3.0",
|
33 | 42 | "prettier": "^1.15.3",
|
|
55 | 64 | "^.+\\.tsx?$": "ts-jest"
|
56 | 65 | },
|
57 | 66 | "verbose": true,
|
58 |
| - "setupFiles": ["<rootDir>/src/tests/__mocks__/browserMocks.js"], |
| 67 | + "setupFiles": [ |
| 68 | + "<rootDir>/src/tests/__mocks__/browserMocks.js" |
| 69 | + ], |
59 | 70 | "testURL": "http://localhost:8080",
|
60 |
| - "moduleFileExtensions": ["js", "jsx", "ts", "tsx"], |
61 |
| - "moduleDirectories": ["node_modules"], |
| 71 | + "moduleFileExtensions": [ |
| 72 | + "js", |
| 73 | + "jsx", |
| 74 | + "ts", |
| 75 | + "tsx" |
| 76 | + ], |
| 77 | + "moduleDirectories": [ |
| 78 | + "node_modules" |
| 79 | + ], |
62 | 80 | "testMatch": [
|
63 | 81 | "**/__tests__/**/*.[jt]s?(x)",
|
64 | 82 | "**/?(*.)(spec|test).[jt]s?(x)"
|
65 | 83 | ],
|
66 | 84 | "moduleNameMapper": {
|
67 |
| - "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": |
68 |
| - "<rootDir>/src/tests/__mocks__/fileMock.js", |
| 85 | + "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/tests/__mocks__/fileMock.js", |
69 | 86 | "\\.(css|less|scss)$": "identity-obj-proxy",
|
70 | 87 | "^./style$": "identity-obj-proxy",
|
71 | 88 | "^preact$": "<rootDir>/node_modules/preact/dist/preact.min.js",
|
|
0 commit comments