Skip to content

Commit 9f72717

Browse files
committed
initial commit
0 parents  commit 9f72717

File tree

10 files changed

+4404
-0
lines changed

10 files changed

+4404
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: publish-npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish-npm:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 18
16+
registry-url: https://registry.npmjs.org
17+
- run: npm ci && npm run build
18+
- run: npm publish --access=public
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/es
2+
/lib
3+
/node_modules
4+
/umd
5+
npm-debug.log*
6+
.vscode
7+
.DS_Store

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) 2022 Mau Joost
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: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# rollup-react-starter-lib-ts
2+
3+
<image width="100px" src="https://rollupjs.org/logo.svg" />
4+
5+
Template to create your own Typescript React library with Rollup.
6+
7+
- Rollup v3 :tada:
8+
- Compatible with new and old React versions, generates ESM/CJS files.
9+
10+
## Build & Publish
11+
12+
You can use this template and
13+
change the name under package.json.
14+
15+
Build
16+
17+
```
18+
npm run build
19+
```
20+
21+
Build & Watch
22+
23+
```
24+
npm run build:watch
25+
```
26+
27+
Publish (public library)
28+
29+
Be sure you are either logged in under `npm login` or you have a token (check https://docs.npmjs.com/creating-and-viewing-access-tokens).
30+
31+
```
32+
npm run publish --access=public
33+
```
34+
35+
## For local testing
36+
37+
cd your-lib-folder/
38+
39+
```
40+
npm link
41+
```
42+
43+
cd your-app/
44+
45+
```
46+
npm link name-of-your-lib
47+
```

0 commit comments

Comments
 (0)