-
Notifications
You must be signed in to change notification settings - Fork 16
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
72 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Development | ||
|
||
## Prerequisites | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
## Development | ||
|
||
serve | ||
|
||
```bash | ||
pnpm serve | ||
``` | ||
|
||
dev | ||
|
||
```bash | ||
pnpm dev -p siyuan | ||
# pnpm dev -p widget -t | ||
# pnpm dev -p static | ||
``` | ||
|
||
## Build | ||
|
||
```bash | ||
pnpm package | ||
``` | ||
|
||
artifacts structure | ||
|
||
``` | ||
├── build | ||
├── package-widget.zip | ||
├── package.zip | ||
├── siyuan-plugin-publisher-1.19.1.zip | ||
├── sy-post-publisher-chrome-1.19.1.zip | ||
├── sy-post-publisher-edge-1.19.1.zip | ||
├── sy-post-publisher-firefox-1.19.1.zip | ||
└── sy-post-publisher-widget-1.19.1.zip | ||
``` | ||
|
||
## Sync to legacy widget repo | ||
|
||
```bash | ||
pnpm syncWidgetRepo | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,10 @@ | |
|
||
请直接查看 [CHANGELOG](./CHANGELOG.md) | ||
|
||
## 开发 | ||
|
||
请参考 [DEVELOPMENT.md](./DEVELOPMENT.md) | ||
|
||
## 平台列表 | ||
|
||
排名不分先后 | ||
|
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
# Please contact Terwer, Shenzhen, Guangdong, China, [email protected] | ||
# or visit www.terwer.space if you need additional information or have any | ||
# questions. | ||
import argparse | ||
import os | ||
|
||
import scriptutils | ||
|
@@ -31,8 +32,21 @@ | |
# Get the current working directory. | ||
cwd = scriptutils.get_workdir() | ||
|
||
# Parse arguments. | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-d", "--dist", required=False, help="the dist for building files") | ||
parser.add_argument("-v", "--verbose", action="store_true", help="Enable verbose output.") | ||
parser.add_argument("-p", "--platform", help="Build for different platforms, like siyuan, widget, static.") | ||
parser.add_argument("-t", "--type", help="Build browser extension for publishing, like chrome, edge, firefox.") | ||
args = parser.parse_args() | ||
|
||
if args.verbose: | ||
print("Verbose mode enabled.") | ||
|
||
# 设置环境变量 | ||
os.environ['BUILD_TYPE'] = 'siyuan' | ||
if not args.platform: | ||
args.platform = 'siyuan' | ||
os.environ['BUILD_TYPE'] = args.platform | ||
|
||
os.system("zhi-build --serve --production") | ||
os.system("vue-tsc --noEmit && vite build --watch") |
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