|
6 | 6 | "scripts": { |
7 | 7 | "lint": "eslint index.js test", |
8 | 8 | "test": "mocha --require babel-register", |
9 | | - "prepublish": "npm run lint && npm run test", |
| 9 | + "build:strip-flow": |
| 10 | + "flow-remove-types --pretty index.original.js > index.js", |
| 11 | + "build:gen-flow": "flow gen-flow-files index.original.js > index.js.flow", |
| 12 | + "build": "npm run build:strip-flow && npm run build:gen-flow", |
| 13 | + "prepublish": |
| 14 | + "npm run build && npm run pretty && npm run lint && npm run test", |
10 | 15 | "travis": "npm run lint && npm run test", |
11 | | - "pretty": "prettier --write --tab-width 2 'test/**/*.js' '*.js'", |
| 16 | + "pretty": "prettier --write --tab-width 2 'test/**/*.js' '*.{js,js.flow}'", |
12 | 17 | "precommit": "lint-staged" |
13 | 18 | }, |
14 | 19 | "lint-staged": { |
15 | | - "*.{js,json,css}": ["prettier --write", "git add"] |
| 20 | + "*.{js,json,css,js.flow}": ["prettier --write", "git add"] |
16 | 21 | }, |
17 | 22 | "author": { |
18 | 23 | "name": "Alberto Leal", |
|
21 | 26 | }, |
22 | 27 | "repository": "dashed/shallowequal", |
23 | 28 | "license": "MIT", |
24 | | - "files": ["index.js"], |
| 29 | + "files": ["index.js", "index.js.flow", "index.original.js"], |
25 | 30 | "keywords": [ |
26 | 31 | "shallowequal", |
27 | 32 | "shallow", |
|
45 | 50 | "babel-register": "^6.24.1", |
46 | 51 | "chai": "^4.0.0", |
47 | 52 | "eslint": "^4.7.1", |
| 53 | + "flow-bin": "^0.72.0", |
| 54 | + "flow-remove-types": "^1.2.3", |
48 | 55 | "husky": "^0.14.3", |
49 | 56 | "lint-staged": "^6.0.0", |
50 | 57 | "mocha": "^5.0.0", |
|
0 commit comments