Skip to content

Commit 3a60bac

Browse files
committed
fix build, add flow sources
1 parent 2b4f4cc commit 3a60bac

File tree

5 files changed

+61
-15
lines changed

5 files changed

+61
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
dist
3+
lib
34
coverage
45
*.log

.npmignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
test
22
coverage
3+
flow-typed
4+
src
5+
test
36
.circleci
47
.flowconfig
5-
flow-typed
8+
webpack.config.js
9+
yarn.lock

package.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"name": "react-dfb",
3-
"version": "1.0.0",
3+
"version": "1.0.2",
44
"description": "A button to allow to download file without href link",
5-
"main": "dist/index.js",
6-
"es6": "src/index.js",
5+
"main": "lib/index.js",
76
"license": "MIT",
87
"author": {
98
"name": "Hugo Capocci",
@@ -48,6 +47,7 @@
4847
"enzyme": "3.4.4",
4948
"enzyme-adapter-react-16": "1.2.0",
5049
"flow-bin": "0.79.1",
50+
"flow-copy-source": "2.0.2",
5151
"jest": "23.5.0",
5252
"react": "16.4.2",
5353
"react-dom": "16.4.2",
@@ -58,9 +58,15 @@
5858
"scripts": {
5959
"flow": "flow",
6060
"prepublish:old": "yarn flow && yarn test",
61-
"prepare": "yarn build",
61+
"prepare": "webpack && yarn build-js && yarn build-flow",
6262
"test": "jest",
63-
"build": "webpack ",
63+
"build-js": "babel src -d lib --ignore *.test.jsx",
64+
"build-flow": "flow-copy-source src lib -i *.test.*",
6465
"build-analyse": "ANALYSE_BUNDLE=true webpack"
65-
}
66+
},
67+
"files": [
68+
"README.md",
69+
"dist/",
70+
"lib/"
71+
]
6672
}

src/index.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ type Props = {
1818
label?: string,
1919
};
2020

21-
type State = {};
22-
23-
class DownloadButton extends React.Component<Props, State> {
24-
state = {};
21+
class DownloadButton extends React.Component<Props> {
2522
static defaultProps = {
2623
disabled: false,
2724
downloadData: {

yarn.lock

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ chokidar@^1.6.1:
14691469
optionalDependencies:
14701470
fsevents "^1.0.0"
14711471

1472-
chokidar@^2.0.2:
1472+
chokidar@^2.0.0, chokidar@^2.0.2:
14731473
version "2.0.4"
14741474
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26"
14751475
dependencies:
@@ -1552,7 +1552,7 @@ code-point-at@^1.0.0:
15521552
version "1.1.0"
15531553
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
15541554

1555-
codecov@^3.0.4:
1555+
codecov@3.0.4:
15561556
version "3.0.4"
15571557
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.0.4.tgz#37f2bf9ed71086923aac7496d982e32e5899dfd8"
15581558
dependencies:
@@ -2429,6 +2429,16 @@ flow-bin@0.79.1:
24292429
version "0.79.1"
24302430
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.79.1.tgz#01c9f427baa6556753fa878c192d42e1ecb764b6"
24312431

2432+
flow-copy-source@^2.0.2:
2433+
version "2.0.2"
2434+
resolved "https://registry.yarnpkg.com/flow-copy-source/-/flow-copy-source-2.0.2.tgz#096e579a9bb63a38afc5d4dd68ac847a5be27594"
2435+
dependencies:
2436+
chokidar "^2.0.0"
2437+
fs-extra "^7.0.0"
2438+
glob "^7.0.0"
2439+
kefir "^3.7.3"
2440+
yargs "^12.0.1"
2441+
24322442
flush-write-stream@^1.0.0:
24332443
version "1.0.3"
24342444
resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd"
@@ -2479,6 +2489,14 @@ from2@^2.1.0:
24792489
inherits "^2.0.1"
24802490
readable-stream "^2.0.0"
24812491

2492+
fs-extra@^7.0.0:
2493+
version "7.0.0"
2494+
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.0.tgz#8cc3f47ce07ef7b3593a11b9fb245f7e34c041d6"
2495+
dependencies:
2496+
graceful-fs "^4.1.2"
2497+
jsonfile "^4.0.0"
2498+
universalify "^0.1.0"
2499+
24822500
fs-minipass@^1.2.5:
24832501
version "1.2.5"
24842502
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
@@ -2572,7 +2590,7 @@ glob-parent@^3.1.0:
25722590
is-glob "^3.1.0"
25732591
path-dirname "^1.0.0"
25742592

2575-
glob@^7.0.3, glob@^7.1.1:
2593+
glob@^7.0.0, glob@^7.0.3, glob@^7.1.1:
25762594
version "7.1.3"
25772595
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
25782596
dependencies:
@@ -2602,7 +2620,7 @@ globals@^9.18.0:
26022620
version "9.18.0"
26032621
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
26042622

2605-
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4:
2623+
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6:
26062624
version "4.1.11"
26072625
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
26082626

@@ -3554,6 +3572,12 @@ json5@^0.5.0, json5@^0.5.1:
35543572
version "0.5.1"
35553573
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
35563574

3575+
jsonfile@^4.0.0:
3576+
version "4.0.0"
3577+
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
3578+
optionalDependencies:
3579+
graceful-fs "^4.1.6"
3580+
35573581
jsprim@^1.2.2:
35583582
version "1.4.1"
35593583
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
@@ -3563,6 +3587,12 @@ jsprim@^1.2.2:
35633587
json-schema "0.2.3"
35643588
verror "1.10.0"
35653589

3590+
kefir@^3.7.3:
3591+
version "3.8.3"
3592+
resolved "https://registry.yarnpkg.com/kefir/-/kefir-3.8.3.tgz#8e0ab10084ed8a01cbb5d4f7f18a0b859f7b9bd9"
3593+
dependencies:
3594+
symbol-observable "1.0.4"
3595+
35663596
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
35673597
version "3.2.2"
35683598
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
@@ -5301,6 +5331,10 @@ supports-color@^5.3.0, supports-color@^5.4.0:
53015331
dependencies:
53025332
has-flag "^3.0.0"
53035333

5334+
symbol-observable@1.0.4:
5335+
version "1.0.4"
5336+
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
5337+
53045338
symbol-tree@^3.2.2:
53055339
version "3.2.2"
53065340
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
@@ -5510,6 +5544,10 @@ unique-slug@^2.0.0:
55105544
dependencies:
55115545
imurmurhash "^0.1.4"
55125546

5547+
universalify@^0.1.0:
5548+
version "0.1.2"
5549+
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
5550+
55135551
unpipe@1.0.0, unpipe@~1.0.0:
55145552
version "1.0.0"
55155553
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"

0 commit comments

Comments
 (0)