From ec7b06b371272119b773bdc3f1d83597eae47e06 Mon Sep 17 00:00:00 2001 From: mg901 Date: Fri, 18 Jan 2019 01:13:29 +0300 Subject: [PATCH] feat: added flow support --- package.json | 10 +++++++--- yarn.lock | 8 +++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d37dc457..cdefd29b 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,16 @@ "main": "lib/styled-breakpoints.cjs.js", "module": "es/styled-breakpoints.es.js", "scripts": { - "build": "npm run clean && rollup -c", + "build": "npx rollup -c", + "postbuild:cjs": "npx flow gen-flow-files src/index.js > lib/styled-breakpoints.cjs.js.flow", + "postbuild:es": "npx flow gen-flow-files src/index.js > es/styled-breakpoints.es.js.flow", + "postbuild": "npm run postbuild:cjs && npm run postbuild:es", "clean": "rimraf lib es", "commit": "git-cz", "coverage": "cat ./coverage/lcov.info | coveralls", "prettier": "prettier './**/**/**.{json,js,eslintrc}' --write", "semantic-release": "semantic-release", - "test": "npm run test:lint && flow && npm run test:code", + "test": "npm run test:lint && npx flow && npm run test:code", "test:watch": "jest --coverage --watch --updateSnapshot", "test:code": "jest --coverage", "test:lint": "eslint .", @@ -47,6 +50,7 @@ "styled-breakpoints" ], "files": [ + "src", "lib", "es" ], @@ -79,7 +83,7 @@ "eslint-plugin-import": "^2.14.0", "eslint-plugin-jest": "22.1.3", "eslint-plugin-prettier": "3.0.1", - "flow-bin": "0.90.0", + "flow-bin": "0.88.0", "husky": "1.3.1", "jest": "^23.6.0", "lint-staged": "8.1.0", diff --git a/yarn.lock b/yarn.lock index 45fb742d..d0ee775d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2783,9 +2783,10 @@ flat-cache@^1.2.1: rimraf "~2.6.2" write "^0.2.1" -flow-bin@0.90.0: - version "0.90.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.90.0.tgz#733b6d29a8c8a22b9a5d273611d9a8402faf3445" +flow-bin@0.88.0: + version "0.88.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.88.0.tgz#e4c7bd93da2331f6ac1733fbe484b1b0c52eb548" + integrity sha512-SnUCuhHP0JZaXQ83w4iTthfTInAg8DIBZCo1xIqDhFmQ6XNEMYMwYhPoMQyELRrkbTpyCYmf4g93y0UQw0dibw== flow-remove-types@^1.1.0: version "1.2.3" @@ -3285,6 +3286,7 @@ ignore@^4.0.3, ignore@^4.0.6: igogo@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/igogo/-/igogo-1.4.1.tgz#b92fa15ff3e4ce363d1e653a073484852902184d" + integrity sha512-iP5nBilE3C2x06QH2wBvomGm5rcw9irt/YAj7XdXj/UJlgwq74s1TFixiU9WY1YTlnOMcA4BttgKwejDRWg3cA== dependencies: core-js "^2.6.2"