Skip to content

Commit e4fcf6f

Browse files
committed
docs: 新增文档,测试工作流的可行性吧
1 parent a3b87c9 commit e4fcf6f

File tree

8 files changed

+3008
-992
lines changed

8 files changed

+3008
-992
lines changed

.changeset/config.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
33
"changelog": "@changesets/cli/changelog",
44
"commit": false,
5-
"fixed": [
6-
7-
],
5+
"fixed": [],
86
"linked": [],
97
"access": "restricted",
108
"baseBranch": "main",

.github/workflows/auto-publish.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Auto Publish Packages
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
7+
paths-ignore:
8+
- '**/*.md'
9+
- '**/*.yml'
10+
- '.github/**'
11+
- '**/*.txt'
12+
13+
permissions:
14+
contents: write
15+
packages: write
16+
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Setup NodeJS
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 18.x
31+
registry-url: ${{ secrets.PUBLISH_URL }}
32+
cache: 'pnpm'
33+
34+
- name: Install pnpm
35+
uses: pnpm/action-setup@v3
36+
with:
37+
version: 8.x
38+
39+
- name: Install dependencies
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Build packages
43+
run: pnpm build
44+
continue-on-error: false
45+
46+
- name: Configure Git User
47+
run: |
48+
git config --global user.name "${{ secrets.GIT_NAME }}"
49+
git config --global user.email "${{ secrets.GIT_EMAIL }}"
50+
51+
- name: Bump versions with changeset
52+
run: pnpm changeset version
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Publish to npm
57+
run: pnpm changeset publish
58+
env:
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
NPM_CONFIG_REGISTRY: ${{ secrets.PUBLISH_URL }}
61+
62+
- name: Push git tags
63+
run: git push origin --tags
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
* 核心包:
2+
3+
* `@lyric-render/core`:内部包含了一些歌词解析的工具,例如:parser,cache 等通用的工具,以及一些类型的定义和常用 utils 吧
4+
5+
* `@lyric-render/react`:基于 core 包实现 react 的 hooks 和 components 吧
6+
7+
* `@lyric-render/vue`:基于 core 包实现 vue 的 components ,但是 vue 这里只是简单的实现
8+
9+
* 技术栈使用
10+
11+
* 打包工具:rollup,typescript,vite(核心解决的是 vue 的打包的问题)
12+
13+
* UI渲染层框架使用:react 和 vue
14+
15+
* 语言:typescript
16+
17+
* 后期功能升级计划
18+
19+
* [x] 去除 React 使用的CSS方案,选择一个更加适配的方案来替代 styled-components,打包后存在资源过大的问题
20+
21+
* [x] 组件适配 SSR 和 SSG 常见下渲染
22+
23+
* [x] 新增其他可扩展的功能,以及一些缓存优化,目前未实现开启 indexedDB 缓存功能

docs/CICD.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
* 利用 changeset 来管理版本号以及 monorepo包的发布
2+
3+
* 也是可以使用其他工具来管理版本号以及 monorepo包的发布,比如:
4+
* `lerna`
5+
* `nx`
6+
7+
* 本仓库使用的方案是:pnpm + pnpm-workspace + changeset 来进行的哈
8+
9+
> https://juejin.cn/post/7181720787400228925

packages/core/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @lyric-render/core

packages/react/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @lyric-render/react

packages/vue/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @lyric-render/vue

0 commit comments

Comments
 (0)