Skip to content

Commit 397d490

Browse files
committed
version 1.1 powered by tsdx 🚀
1 parent 8d48188 commit 397d490

18 files changed

+19602
-2803
lines changed

.babelrc

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

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
on: [push]
3+
jobs:
4+
build:
5+
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
6+
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
node: ['10.x', '12.x', '14.x']
11+
os: [ubuntu-latest, windows-latest, macOS-latest]
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v2
16+
17+
- name: Use Node ${{ matrix.node }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node }}
21+
22+
- name: Install deps and build (with cache)
23+
uses: bahmutov/npm-install@v1
24+
25+
- name: Lint
26+
run: yarn lint
27+
28+
- name: Test
29+
run: yarn test --ci --coverage --maxWorkers=2
30+
31+
- name: Build
32+
run: yarn build

.github/workflows/size.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: size
2+
on: [pull_request]
3+
jobs:
4+
size:
5+
runs-on: ubuntu-latest
6+
env:
7+
CI_JOB_NUMBER: 1
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: andresz1/size-limit-action@v1
11+
with:
12+
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
*.log
2+
.DS_Store
13
node_modules
2-
dist/
4+
.cache
5+
dist

.npmignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/src
1+
src
22
webpack.config.js
33
tsconfig.json
44
yarn.lock
5-
dist/index.js.LICENSE.txt
6-
.babelrc
5+
.babelrc
6+
.github

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 kylemocode
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# React Lite Youtube Embed
2-
React component version of [lite-youtube-embed]([https://](https://github.com/paulirish/lite-youtube-embed)), which focus on visual performance, rendering just like the real thing but much faster.
2+
React component version of [lite-youtube-embed]([https://](https://github.com/paulirish/lite-youtube-embed)) power by tsdx, which focus on visual performance, rendering just like the real thing but much faster.
33

44
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkylemocode%2Freact-lite-yt-embed.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkylemocode%2Freact-lite-yt-embed?ref=badge_shield)
55
[![Weekly Downloads](https://img.shields.io/npm/dw/react-lite-yt-embed)](https://img.shields.io/npm/dw/react-lite-yt-embed)
@@ -35,6 +35,7 @@ import { LiteYoutubeEmbed } from 'react-lite-yt-embed';
3535
<>
3636
<LiteYoutubeEmbed id={id}> {/* ID of youtube video */}
3737
{/* You can add more props, see the description below. */}
38+
{/* You can also give the iframe an outer container */}
3839
</>
3940
```
4041

@@ -53,8 +54,8 @@ import { LiteYoutubeEmbed } from 'react-lite-yt-embed';
5354
## Roadmap
5455
- [ ] Use react-testing-library to test whether component render correctly.
5556
- [ ] More features
56-
- [ ] Setup lint-stage
57-
- [ ] Add Prettier
57+
- [x] Setup lint-stage
58+
- [x] Add Prettier
5859
- [ ] CI/CD pipeline
5960

6061
## License

0 commit comments

Comments
 (0)