Skip to content

Commit 84129f0

Browse files
committed
U
0 parents  commit 84129f0

22 files changed

Lines changed: 3993 additions & 0 deletions

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "repro",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"scripts": {
6+
"test": "echo \"Error: no test specified\" && exit 1"
7+
},
8+
"keywords": [],
9+
"author": "",
10+
"license": "ISC",
11+
"description": ""
12+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
24+
- run: npx changelogithub
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Unit Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4.1.0
18+
19+
- name: Set node LTS
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
cache: pnpm
24+
25+
- name: Install
26+
run: pnpm install
27+
28+
- name: Build
29+
run: pnpm run build
30+
31+
- name: Lint
32+
run: pnpm run lint
33+
34+
- name: Typecheck
35+
run: pnpm run typecheck
36+
37+
- name: Test
38+
run: pnpm run test

sl-ui/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
*.log
4+
.DS_Store

sl-ui/.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false
4+
}

sl-ui/.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.formatOnSave": true
3+
}

sl-ui/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# react-components-starter
2+
3+
A starter for creating a React component library.
4+
5+
## Development
6+
7+
- Install dependencies:
8+
9+
```bash
10+
npm install
11+
```
12+
13+
- Run the playground:
14+
15+
```bash
16+
npm run playground
17+
```
18+
19+
- Run the unit tests:
20+
21+
```bash
22+
npm run test
23+
```
24+
25+
- Build the library:
26+
27+
```bash
28+
npm run build
29+
```

sl-ui/package.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"name": "react-components-starter",
3+
"version": "0.0.0",
4+
"description": "A starter for creating a React component library.",
5+
"type": "module",
6+
"license": "MIT",
7+
"homepage": "https://github.com/author/library#readme",
8+
"bugs": {
9+
"url": "https://github.com/author/library/issues"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/author/library.git"
14+
},
15+
"author": "Author Name <author.name@mail.com>",
16+
"files": [
17+
"dist"
18+
],
19+
"main": "./dist/index.js",
20+
"module": "./dist/index.js",
21+
"types": "./dist/index.d.ts",
22+
"exports": {
23+
".": "./dist/index.js",
24+
"./package.json": "./package.json"
25+
},
26+
"publishConfig": {
27+
"access": "public"
28+
},
29+
"scripts": {
30+
"build": "tsdown",
31+
"dev": "tsdown --watch",
32+
"playground": "vite --config playground/vite.config.ts",
33+
"test": "vitest",
34+
"typecheck": "tsc --noEmit",
35+
"release": "bumpp && pnpm publish",
36+
"prepublishOnly": "pnpm run build"
37+
},
38+
"devDependencies": {
39+
"@tailwindcss/postcss": "^4.1.11",
40+
"@testing-library/jest-dom": "^6.6.3",
41+
"@testing-library/react": "^16.3.0",
42+
"@types/node": "^22.15.17",
43+
"@types/react": "^19.1.3",
44+
"@types/react-dom": "^19.1.4",
45+
"@vitejs/plugin-react": "^4.4.1",
46+
"bumpp": "^10.1.0",
47+
"happy-dom": "^17.4.6",
48+
"postcss": "^8.5.6",
49+
"react": "^19.1.0",
50+
"react-dom": "^19.1.0",
51+
"rollup-plugin-postcss": "^4.0.2",
52+
"tailwindcss": "^4.1.11",
53+
"tsdown": "^0.13.4",
54+
"typescript": "^5.8.3",
55+
"vite": "npm:rolldown-vite@latest",
56+
"vitest": "^3.1.3"
57+
},
58+
"dependencies": {
59+
"@shilong/utils": "^0.0.9"
60+
}
61+
}

sl-ui/playground/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>React Components Starter</title>
7+
</head>
8+
<body>
9+
<div id="app"></div>
10+
<script type="module" src="/src/index.tsx"></script>
11+
</body>
12+
</html>

sl-ui/playground/src/App.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { MyButton } from '../../dist/index'
2+
import '../../dist/global.css'
3+
4+
export function App() {
5+
return (
6+
<>
7+
<MyButton type="primary" />
8+
</>
9+
)
10+
}

0 commit comments

Comments
 (0)