|
12 | 12 | "license": "MIT",
|
13 | 13 | "scripts": {
|
14 | 14 | "tdd": "jest --watch",
|
15 |
| - "test": "npm run lint && jest", |
| 15 | + "test": "npm run test:types && npm run lint && jest", |
16 | 16 | "testonly": "jest",
|
| 17 | + "test:types": "dtslint types", |
17 | 18 | "build:es": "babel src -d lib/es --env-name esm --ignore **/__tests__ ",
|
18 |
| - "build:lib": "babel src -d lib --ignore **/__tests__ --delete-dir-on-start ", |
19 |
| - "build": "npm run build:lib && npm run build:es", |
| 19 | + "build:lib": |
| 20 | + "babel src -d lib --ignore **/__tests__ --delete-dir-on-start ", |
| 21 | + "build": |
| 22 | + "npm run build:lib && npm run build:es && cpy types/index.d.ts lib/types", |
20 | 23 | "prepublishOnly": "yarn run build",
|
21 |
| - "lint": "eslint . && prettier --list-different --ignore-path .eslintignore '**/*.{json,css,md}'", |
22 |
| - "format": "eslint . --fix && prettier --write --ignore-path .eslintignore '**/*.{json,css,md}'", |
| 24 | + "lint": |
| 25 | + "eslint . && prettier --list-different --ignore-path .eslintignore '**/*.{json,css,md}'", |
| 26 | + "format": |
| 27 | + "eslint . --fix && prettier --write --ignore-path .eslintignore '**/*.{json,css,md}'", |
23 | 28 | "precommit": "lint-staged"
|
24 | 29 | },
|
25 | 30 | "publishConfig": {
|
|
31 | 36 | "trailingComma": "all"
|
32 | 37 | },
|
33 | 38 | "lint-staged": {
|
34 |
| - "*.js": [ |
35 |
| - "eslint --fix", |
36 |
| - "git add" |
37 |
| - ], |
| 39 | + "*.js": ["eslint --fix", "git add"], |
38 | 40 | "*.{json,css,md}": [
|
39 | 41 | "prettier --write --ignore-path .eslintignore",
|
40 | 42 | "git add"
|
41 | 43 | ]
|
42 | 44 | },
|
43 | 45 | "jest": {
|
44 |
| - "roots": [ |
45 |
| - "<rootDir>/test" |
46 |
| - ], |
| 46 | + "roots": ["<rootDir>/test"], |
47 | 47 | "testEnvironment": "jsdom",
|
48 |
| - "setupFiles": [ |
49 |
| - "<rootDir>/test/index.js" |
50 |
| - ] |
| 48 | + "setupFiles": ["<rootDir>/test/index.js"] |
51 | 49 | },
|
52 | 50 | "release": {
|
53 |
| - "extends": [ |
54 |
| - "@4c/semantic-release-config" |
55 |
| - ], |
| 51 | + "extends": ["@4c/semantic-release-config"], |
56 | 52 | "pkgRoot": "lib"
|
57 | 53 | },
|
58 | 54 | "devDependencies": {
|
|
65 | 61 | "babel-eslint": "^8.2.1",
|
66 | 62 | "babel-jest": "^22.4.3",
|
67 | 63 | "codecov": "^3.0.2",
|
| 64 | + "cpy-cli": "^2.0.0", |
68 | 65 | "dtslint": "^0.3.0",
|
69 | 66 | "enzyme": "^3.7.0",
|
70 | 67 | "enzyme-adapter-react-16": "^1.6.0",
|
|
0 commit comments