Skip to content

Commit 0c45a1a

Browse files
Daniel Schmidtthebuilder
authored andcommitted
Remove ES build - Wasn't really importing anything anyway.
Add flow-copy-source
1 parent fb163cb commit 0c45a1a

File tree

3 files changed

+41
-20
lines changed

3 files changed

+41
-20
lines changed

.babelrc.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
11
module.exports = {
2-
presets: [
3-
[
4-
'env',
5-
process.env.BABEL_ENV === 'es'
6-
? {
7-
modules: false,
8-
}
9-
: {},
10-
],
11-
'react',
12-
'stage-2',
13-
],
2+
presets: ['env', 'react', 'stage-2'],
143
}

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"version": "1.2.1",
44
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API",
55
"main": "lib/index.js",
6-
"module": "es/index.js",
7-
"jsnext:main": "es/index.js",
86
"author": "Daniel Schmidt",
97
"repository": {
108
"type": "git",
@@ -19,10 +17,10 @@
1917
"inview"
2018
],
2119
"scripts": {
22-
"build": "rm -rf lib && npm run build:lib && npm run build:es",
23-
"build:es": "BABEL_ENV=es babel src --out-dir es --ignore __*,*.story.js,*.test.js",
20+
"build": "rm -rf lib es && npm run build:lib && npm run build:flow",
2421
"build:lib": "babel src --out-dir lib --ignore __*,*.story.js,*.test.js",
2522
"build:storybook": "build-storybook --output-dir example",
23+
"build:flow": "flow-copy-source -v src lib",
2624
"dev": "concurrently -k -r 'jest --watch' 'npm run storybook'",
2725
"lint": "eslint {src,stories,tests}/. ",
2826
"precommit": "flow && lint-staged",
@@ -58,8 +56,7 @@
5856
"<rootDir>/jest-setup.js"
5957
]
6058
},
61-
"dependencies": {
62-
},
59+
"dependencies": {},
6360
"peerDependencies": {
6461
"react": "^15.0.0 || ^16.0.0 || ^17.0.0"
6562
},
@@ -80,6 +77,7 @@
8077
"eslint": "^4.9.0",
8178
"eslint-config-insilico": "^5.0.1",
8279
"flow-bin": "^0.57.3",
80+
"flow-copy-source": "^1.2.1",
8381
"husky": "^0.14.3",
8482
"intersection-observer": "^0.4.0",
8583
"jest": "^21.2.1",

yarn.lock

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3090,6 +3090,16 @@ flow-bin@^0.57.3:
30903090
version "0.57.3"
30913091
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.57.3.tgz#843fb80a821b6d0c5847f7bb3f42365ffe53b27b"
30923092

3093+
flow-copy-source@^1.2.1:
3094+
version "1.2.1"
3095+
resolved "https://registry.yarnpkg.com/flow-copy-source/-/flow-copy-source-1.2.1.tgz#705c2fa8fb29a281118e1c4b66218dec24b745ec"
3096+
dependencies:
3097+
chokidar "^1.7.0"
3098+
fs-extra "^3.0.1"
3099+
glob "^7.0.0"
3100+
kefir "^3.7.3"
3101+
yargs "^8.0.2"
3102+
30933103
for-in@^1.0.1:
30943104
version "1.0.2"
30953105
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
@@ -3132,6 +3142,14 @@ [email protected]:
31323142
version "0.5.2"
31333143
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
31343144

3145+
fs-extra@^3.0.1:
3146+
version "3.0.1"
3147+
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291"
3148+
dependencies:
3149+
graceful-fs "^4.1.2"
3150+
jsonfile "^3.0.0"
3151+
universalify "^0.1.0"
3152+
31353153
fs-readdir-recursive@^1.0.0:
31363154
version "1.0.0"
31373155
resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560"
@@ -3287,7 +3305,7 @@ globby@^5.0.0:
32873305
pify "^2.0.0"
32883306
pinkie-promise "^2.0.0"
32893307

3290-
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4:
3308+
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6:
32913309
version "4.1.11"
32923310
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
32933311

@@ -4227,6 +4245,12 @@ json5@^0.5.0, json5@^0.5.1:
42274245
version "0.5.1"
42284246
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
42294247

4248+
jsonfile@^3.0.0:
4249+
version "3.0.1"
4250+
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66"
4251+
optionalDependencies:
4252+
graceful-fs "^4.1.6"
4253+
42304254
jsonify@~0.0.0:
42314255
version "0.0.0"
42324256
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
@@ -4250,6 +4274,12 @@ jsx-ast-utils@^2.0.0:
42504274
dependencies:
42514275
array-includes "^3.0.3"
42524276

4277+
kefir@^3.7.3:
4278+
version "3.7.4"
4279+
resolved "https://registry.yarnpkg.com/kefir/-/kefir-3.7.4.tgz#edc6192f686be611ac5c882426f74bf0ee287ef7"
4280+
dependencies:
4281+
symbol-observable "1.0.4"
4282+
42534283
keycode@^2.1.8:
42544284
version "2.1.9"
42554285
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.1.9.tgz#964a23c54e4889405b4861a5c9f0480d45141dfa"
@@ -6480,7 +6510,7 @@ svgo@^0.7.0:
64806510
sax "~1.2.1"
64816511
whet.extend "~0.9.9"
64826512

6483-
symbol-observable@^1.0.1, symbol-observable@^1.0.3:
6513+
symbol-observable@1.0.4, symbol-observable@^1.0.1, symbol-observable@^1.0.3:
64846514
version "1.0.4"
64856515
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
64866516

@@ -6680,6 +6710,10 @@ unique-string@^1.0.0:
66806710
dependencies:
66816711
crypto-random-string "^1.0.0"
66826712

6713+
universalify@^0.1.0:
6714+
version "0.1.1"
6715+
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
6716+
66836717
[email protected], unpipe@~1.0.0:
66846718
version "1.0.0"
66856719
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"

0 commit comments

Comments
 (0)