Skip to content

Commit 8361821

Browse files
authored
refactor: use microbundle instead of babel + typescript + rollup (#683)
* chore: bump deps * chore: bump node images * chore: move back to npm * chore: tslint isn't used * chore: use microbundle, modernise scripts * chore: fix lint-staged * chore: regen lockfile * chore: reuse * chore: allow slightly larger bundlesize
1 parent 1c36b6e commit 8361821

16 files changed

+12484
-9461
lines changed

.babelrc.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

.circleci/config.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
aliases:
22
- &restore-cache
33
keys:
4-
- v1-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
4+
- v2-dependencies-{{ .Branch }}-{{ checksum "package-lock.json" }}
55
# Fallback in case checksum fails
6-
- v1-dependencies-{{ .Branch }}-
6+
- v2-dependencies-{{ .Branch }}-
77

88
- &install
9-
run: yarn --no-progress
9+
run: npm ci
1010

1111
- &save-cache
1212
paths:
1313
- node_modules
14-
key: v1-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
14+
key: v2-dependencies-{{ .Branch }}-{{ checksum "package-lock.json" }}
1515

1616
version: 2
1717
jobs:
1818
Typecheck:
1919
docker:
20-
- image: circleci/node:8
20+
- image: circleci/node:12
2121
steps:
2222
- checkout
2323
- restore-cache: *restore-cache
2424
- *install
25-
- run: yarn typecheck
25+
- run: npm run typecheck
2626

2727
Build:
2828
docker:
29-
- image: circleci/node:8
29+
- image: circleci/node:12
3030
steps:
3131
- checkout
3232
- restore-cache: *restore-cache
3333
- *install
34-
- run: yarn build
34+
- run: npm run build
3535
- run: npx bundlesize
3636
- save-cache: *save-cache
3737

3838
Test:
3939
docker:
40-
- image: circleci/node:8
40+
- image: circleci/node:12
4141
steps:
4242
- checkout
4343
- restore-cache: *restore-cache
4444
- run:
4545
name: Workaround for GoogleChrome/puppeteer#290
4646
command: 'sh .circleci/setup_puppeteer.sh'
4747
- *install
48-
- run: yarn build:umd
48+
- run: npm run build:umd
4949
- run:
50-
command: yarn test --ci --runInBand
50+
command: npm test -- --ci --runInBand
5151
- store_test_results:
5252
path: reports
5353

5454
Semantic Release:
5555
docker:
56-
- image: circleci/node:8
56+
- image: circleci/node:12
5757
steps:
5858
- checkout
5959
- restore-cache: *restore-cache

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ dist
6969
es
7070
umd
7171
reports
72-
/index.js
72+
/index.js
73+
junit.xml

.prettierignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
dist
12
node_modules
2-
package.json
3+
package.json
4+
package-lock.json
5+
umd

integration/body.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
4-
<script src="../umd/compute-scroll-into-view.js"></script>
4+
<script src="../umd/compute-scroll-into-view.min.js"></script>
55
<script src="./utils.js"></script>
66
<style>
77
*, *:before, *:after {

integration/deeply_nested_overflow.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
4-
<script src="../umd/compute-scroll-into-view.js"></script>
4+
<script src="../umd/compute-scroll-into-view.min.js"></script>
55
<script src="./utils.js"></script>
66
<style>
77
html, body {

integration/iframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
4-
<script src="../umd/compute-scroll-into-view.js"></script>
4+
<script src="../umd/compute-scroll-into-view.min.js"></script>
55
<script src="./utils.js"></script>
66
<iframe srcdoc="
77
<div class='container' style='height: 100vh'></div>

integration/nested_overflow.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
4-
<script src="../umd/compute-scroll-into-view.js"></script>
4+
<script src="../umd/compute-scroll-into-view.min.js"></script>
55
<script src="./utils.js"></script>
66
<style>
77
html, body {

integration/overflow_auto.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
4-
<script src="../umd/compute-scroll-into-view.js"></script>
4+
<script src="../umd/compute-scroll-into-view.min.js"></script>
55
<script src="./utils.js"></script>
66
<style>
77
html, body {

integration/target_same_height.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
4-
<script src="../umd/compute-scroll-into-view.js"></script>
4+
<script src="../umd/compute-scroll-into-view.min.js"></script>
55
<script src="./utils.js"></script>
66
<style>
77
html, body {

0 commit comments

Comments
 (0)