-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
43 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: # 添加 workflow_dispatch 触发器 | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: # 添加 workflow_dispatch 触发器 | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install pnpm -g | ||
- run: pnpm install --no-frozen-lockfile | ||
- run: npm pkg set name=cn-font-split | ||
working-directory: packages/subsets | ||
- run: npm run prepublish | ||
working-directory: packages/subsets | ||
- run: npm publish --access public | ||
working-directory: packages/subsets | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install pnpm -g | ||
- run: pnpm install --no-frozen-lockfile | ||
- run: pnpm -C ./packages/font-sharp build | ||
- run: npm pkg set name=cn-font-split | ||
working-directory: packages/subsets | ||
- run: npm run prepublish | ||
working-directory: packages/subsets | ||
- run: npm publish --access public | ||
working-directory: packages/subsets | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ npm install @konghayao/cn-font-split -g # 如果使用命令行,推荐全局 | |
cn-font-split -i=../demo/public/SmileySans-Oblique.ttf -o=./temp | ||
|
||
# 参数与正常 js 操作是一样的,深层json则需要使用 . 来赋值 | ||
cn-font-split -i=../demo/public/SmileySans-Oblique.ttf -o=./temp --renameOutputFont=[hash:10][ext] --css.fontWeight=700 | ||
cn-font-split -i=../demo/public/SmileySans-Oblique.ttf -o=./temp --renameOutputFont='[hash:10][ext]' --css.fontWeight=700 | ||
|
||
# 显示输入参数说明,虽然会显示 typescript 类型。。。 | ||
cn-font-split -h | ||
|
@@ -82,7 +82,7 @@ import { fontSplit } from '@konghayao/cn-font-split'; | |
// import { fontSplit } from "https://cdn.jsdelivr.net/npm/@konghayao/[email protected]/dist/browser/index.js"; | ||
|
||
fontSplit({ | ||
FontPath: './fonts/SourceHanSerifCN-Bold.ttf', // 部分 otf 文件会报错,最好使用 ttf 版本的字体 | ||
FontPath: './fonts/SourceHanSerifCN-Bold.ttf', // 推荐使用 otf、ttf 字体 | ||
destFold: './build', | ||
chunkSize: 70 * 1024, // 如果需要的话,自己定制吧 | ||
testHTML: true, // 输出一份 html 报告文件 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters