Skip to content

Commit d4cbed6

Browse files
committed
Change build system to tsup and add experimental web animations api support
1 parent 45b4561 commit d4cbed6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+44900
-14360
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

.eslintrc.cjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* eslint-env node */
2+
3+
module.exports = {
4+
root: true,
5+
parser: '@typescript-eslint/parser',
6+
plugins: ['@typescript-eslint', 'jsx-a11y'],
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:react/recommended',
11+
'prettier',
12+
],
13+
rules: {
14+
'no-unused-vars': 'off',
15+
'@typescript-eslint/no-unused-vars': [
16+
'error',
17+
{ ignoreRestSiblings: true },
18+
],
19+
'react/jsx-uses-react': 'off',
20+
'react/react-in-jsx-scope': 'off',
21+
},
22+
};

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
uses: bahmutov/npm-install@v1
2424

2525
- name: Lint
26-
run: yarn lint
26+
run: npm run lint
2727

2828
- name: Test
29-
run: yarn test --ci --coverage --maxWorkers=2
29+
run: npm run test --ci --coverage --maxWorkers=2
3030

3131
- name: Build
32-
run: yarn build
32+
run: npm run build

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Publish
22

33
on:
44
release:
5+
# This specifies that the build will be triggered when we publish a release
56
types: [published]
67

78
jobs:
@@ -16,9 +17,9 @@ jobs:
1617
node-version: 'lts/*'
1718
registry-url: https://registry.npmjs.org/
1819

19-
- run: yarn install
20+
- run: npm run install
2021

21-
- run: yarn build
22+
- run: npm run build
2223

2324
- run: npm publish --access public
2425
env:

.github/workflows/size.yml

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

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A set of tools for emulating browser behavior in jsdom environment
1515
## Installation
1616

1717
```sh
18-
npm install --save-dev jsdom-testing-mocks
18+
npm i --D jsdom-testing-mocks
1919
```
2020

2121
or
@@ -171,7 +171,7 @@ const DivWithSize = () => {
171171
const ref = useRef(null);
172172

173173
useEffect(() => {
174-
const observer = new ResizeObserver(entries => {
174+
const observer = new ResizeObserver((entries) => {
175175
setSize({
176176
width: entries[0].contentRect.width,
177177
height: entries[0].contentRect.height,

example/.npmignore

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

example/App.tsx

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

0 commit comments

Comments
 (0)