Skip to content

Commit 384dbeb

Browse files
authored
refactor: migrate to monorepo (#78)
* refactor: monorepo * tweaks * fix: cli dup exec * docs: update mpnorepo link doc * docs: add twoslash * docs: add readme for npm pkg * chore: dir config in package.json * chore: rm useless scripts
1 parent 1e73ad8 commit 384dbeb

61 files changed

Lines changed: 648 additions & 149 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
4444
- name: Run pkg-pr-new publish
4545
if: github.event_name == 'pull_request'
46-
run: pnpx pkg-pr-new publish
46+
run: pnpx pkg-pr-new publish --compact --no-template --pnpm './packages/*'

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Upload artifact
5858
uses: actions/upload-pages-artifact@v3
5959
with:
60-
path: docs/.vitepress/dist
60+
path: docs/src/.vitepress/dist
6161

6262
- name: Deploy to GitHub Pages
6363
id: deployment

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
4444
- name: Release
4545
run: |
46-
pnpm publish --no-git-checks
46+
pnpm -r publish --access public --no-git-checks
4747
pnpx changelogithub
4848
# sleep 1s
4949
env:

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ build
88
.npmrc
99

1010
# vitepress
11-
docs/.vitepress/dist
12-
docs/.vitepress/cache
11+
**/.vitepress/dist
12+
**/.vitepress/cache

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ git clone https://github.com/northword/zotero-plugin-scaffold.git zotero-plugin-
2626
cd zotero-plugin-scaffold/
2727

2828
# Install deps
29+
corepack enable
2930
pnpm install
3031

3132
# Development Mode
@@ -35,9 +36,8 @@ pnpm run dev
3536

3637
# link local scaffold to your plugin
3738
cd your-plugin-work-dir/
38-
pnpm link ../zotero-plugin-scaffold
39+
pnpm link ../zotero-plugin-scaffold/packages/scaffold/
3940
cd zotero-plugin-scaffold/
40-
4141
```
4242

4343
Now you can make changes to Scaffold and test them in your plugin.

docs/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Docs
2+
3+
The documentation is written in Markdown syntax, using VitePress as the SSG, Shiki as the syntax highlighter, and Twoslash to provide inline type hover inside code blocks.
4+
5+
You can execute the following command in the project root directory:
6+
7+
```bash
8+
# development
9+
pnpm docs:dev
10+
11+
# build
12+
pnpm docs:build
13+
```
14+
15+
Alternatively, you can run `pnpm dev` / `pnpm build` in the `docs` directory instead.
16+
17+
For syntax and configuration, see the following:
18+
19+
- [Markdown Syntax Reference](https://vitepress.dev/guide/markdown)
20+
- [Twoslash Notation References](https://twoslash.netlify.app/refs/notations)
21+
- [VitePress Config Reference](https://vitepress.dev/reference/site-config)
22+
23+
For code blocks, you can trigger Twoslash by adding `twoslash` after the Markdown block language, see [Explicit Use of Twoslash](https://shiki.style/packages/twoslash#explicit-trigger).

docs/build.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "docs",
3+
"type": "module",
4+
"version": "0.2.0-beta.12",
5+
"private": "true",
6+
"packageManager": "[email protected]",
7+
"scripts": {
8+
"dev": "vitepress dev src",
9+
"build": "vitepress build src",
10+
"preview": "vitepress preview src"
11+
},
12+
"devDependencies": {
13+
"@shikijs/vitepress-twoslash": "^1.24.4",
14+
"vitepress": "^1.5.0",
15+
"zotero-plugin-scaffold": "workspace:^"
16+
}
17+
}

docs/release.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/serve.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)