-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from terwer/dev
feat: add dependentbot monorepo support
- Loading branch information
Showing
26 changed files
with
1,348 additions
and
54 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 |
---|---|---|
@@ -0,0 +1,258 @@ | ||
version: 2 | ||
updates: | ||
# Fetch and update latest `npm` packages | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "zhi-root" | ||
|
||
- package-ecosystem: npm | ||
directory: "/packages/api-docs" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "api-docs" | ||
|
||
- package-ecosystem: npm | ||
directory: "/packages/esbuild-config-custom" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "esbuild-config-custom" | ||
|
||
- package-ecosystem: npm | ||
directory: "/packages/eslint-config-custom" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "eslint-config-custom" | ||
|
||
- package-ecosystem: npm | ||
directory: "/packages/jest-config-custom" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "jest-config-custom" | ||
|
||
- package-ecosystem: npm | ||
directory: "/packages/tsconfig" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "tsconfig" | ||
|
||
- package-ecosystem: npm | ||
directory: "/apps/zhi-cli" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "zhi-cli" | ||
|
||
- package-ecosystem: npm | ||
directory: "/apps/zhi-core" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "zhi-core" | ||
|
||
- package-ecosystem: npm | ||
directory: "/apps/zhi-device-detection" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "zhi-device-detection" | ||
|
||
- package-ecosystem: npm | ||
directory: "/apps/zhi-docs" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "zhi-docs" | ||
|
||
- package-ecosystem: npm | ||
directory: "/apps/zhi-env" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "zhi-env" | ||
|
||
- package-ecosystem: npm | ||
directory: "/apps/zhi-log" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "zhi-log" | ||
|
||
- package-ecosystem: npm | ||
directory: "/apps/zhi-server-modules-blog-astro" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "npm dependencies" | ||
- "zhi" | ||
- "server-modules" | ||
- "blog" | ||
- "astro" | ||
|
||
# Fetch and update latest `github-actions` pkgs | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- terwer | ||
assignees: | ||
- terwer | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
labels: | ||
- "github actions" | ||
- "ci" |
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,73 +1,68 @@ | ||
# Turborepo starter | ||
# zhi | ||
|
||
This is an official pnpm starter turborepo. | ||
🛍️ A siyuan-note theme with plugin and blog bundled | ||
|
||
## What's inside? | ||
[中文版](README_zh_CN.md) | ||
|
||
This turborepo uses [pnpm](https://pnpm.io) as a package manager. It includes the following packages/apps: | ||
[![](https://img.shields.io/badge/api-docs-green)](https://zhi.terwer.space) | ||
[![dev checks](https://img.shields.io/github/checks-status/terwer/zhi/dev?label=build)](https://github.com/terwer/zhi/tree/dev) | ||
![version](https://img.shields.io/github/release/terwer/zhi.svg?style=flat-square) | ||
![license](https://img.shields.io/badge/license-GPL-blue.svg?style=popout-square) | ||
|
||
### Apps and Packages | ||
[![](https://img.shields.io/badge/build-assets-green)](https://github.com/terwer/zhi) | ||
[![](https://img.shields.io/badge/theme-source-red)](https://github.com/terwer/zhi/tree/dev/packages/zhi-mini) | ||
[![](https://img.shields.io/badge/dynamic-blog-blue)](https://github.com/terwer/zhi/tree/dev/packages/zhi-blog) | ||
[![](https://img.shields.io/badge/static-blog-purple)](https://github.com/terwer/zhi/tree/dev/packages/zhi-blog-astro) | ||
|
||
- `docs`: a [Next.js](https://nextjs.org/) app | ||
- `web`: another [Next.js](https://nextjs.org/) app | ||
- `ui`: a stub React component library shared by both `web` and `docs` applications | ||
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) | ||
- `tsconfig`: `tsconfig.json`s used throughout the monorepo | ||
> ⚠️ WARNING 1: Attention: The `zhi` theme only supports the `2.7.6+` version of [siyuan-note](https://github.com/siyuan-note/siyuan) , and the plugin system only supports `2.8.1+`. Otherwise, you need to upgrade [siyuan-note](https://github.com/siyuan-note/siyuan) to a new version. | ||
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). | ||
> ⚠️ WARNING 2: `1.0.0` is an available version in the early stage, and the function is not comprehensive yet. It is only used for testing and welcomes valuable opinions through issuing. Please refer to [core features](#core-features) for this version's characteristics. | ||
### Utilities | ||
> ⚠️ WARNING 3: The plugin system is set to `security mode` by default, and you need to click on the settings menu in the upper right corner to turn off the security mode before you can activate the plugin system. | ||
This turborepo has some additional tools already setup for you: | ||
> ⚠️ WARNING 4: Except for the theme's core plugins, all plugins are disabled by default and need to be enabled in the plugin list before the first use. | ||
- [TypeScript](https://www.typescriptlang.org/) for static type checking | ||
- [ESLint](https://eslint.org/) for code linting | ||
- [Prettier](https://prettier.io) for code formatting | ||
## Quick start | ||
|
||
### Build | ||
You can download the `zhi` theme directly in the Market of siyuan-note, and then select the `zhi` theme | ||
in `Settings` - `Appearance` - `Theme` to change the appearance of the notebook. | ||
|
||
To build all apps and packages, run the following command: | ||
Note: `zhi` theme only supports siyuan-note `2.7.6+`, or you must upgrade siyuan-note first. | ||
|
||
``` | ||
cd my-turborepo | ||
pnpm run build | ||
``` | ||
## Design Philosophy | ||
|
||
### Develop | ||
- The theme core should be kept lightweight and compact as much as possible. | ||
- Plugins should be used as much as possible to implement functions. | ||
- Plugin functions should be single-purpose to avoid brainless accumulation of functions. | ||
- Components should be kept as reusable as possible. | ||
|
||
To develop all apps and packages, run the following command: | ||
## Core Features | ||
|
||
``` | ||
cd my-turborepo | ||
pnpm run dev | ||
``` | ||
The theme is inspired by `Zhihu` but not limited to its style. The appearance optimization includes but is not limited | ||
to: | ||
|
||
### Remote Caching | ||
- Font style beautification, using `Open Sans` for English and `LXGW WenKai` for Chinese | ||
- Background color optimization, overall layout and spacing optimization | ||
- Code block beautification, similar to the Mac window style | ||
- It natively supports the plugin system and comes with many built-in plugins. The plugin system is supported by | ||
community developers. | ||
- SourceNote publishing tool plugin | ||
- Document image background automatic transparency plugin | ||
- Blog plugin | ||
- It can handle both the theme and the preview. Installing the zhi theme is equivalent to installing an additional | ||
plugin system and an online blog. | ||
- SPA blog homepage: http://127.0.0.1:6806/appearance/themes/zhi/web/blog/ <sup>simple</sup> | ||
- SSR blog homepage: http://127.0.0.1:6806/appearance/themes/zhi/server/blog/ <sup>seo friendly</sup> | ||
- Widget version of the blog management and publishing [Deprecated] | ||
homepage: http://127.0.0.1:6806/widgets/sy-post-publisher/blog/?from=siyuanNewWin | ||
|
||
Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines. | ||
> Note: 🌹 The plugin system is provided by enthusiastic community developers. Please understand the relevant mechanisms in | ||
> detail before using. | ||
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands: | ||
## Technical Roadmap | ||
|
||
``` | ||
cd my-turborepo | ||
pnpm dlx turbo login | ||
``` | ||
[tech](tech.md) | ||
|
||
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). | ||
## Acknowledgments | ||
|
||
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo: | ||
|
||
``` | ||
pnpm dlx turbo link | ||
``` | ||
|
||
## Useful Links | ||
|
||
Learn more about the power of Turborepo: | ||
|
||
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks) | ||
- [Caching](https://turbo.build/repo/docs/core-concepts/caching) | ||
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) | ||
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering) | ||
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration) | ||
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference) | ||
Thanks to [zuoez02](https://github.com/zuoez02/siyuan-plugin-system) for providing the plugin system. |
Oops, something went wrong.
1651b03
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
zhi – ./
zhi-git-main-terwergreen.vercel.app
zhi-terwergreen.vercel.app
zhi.vercel.app
zhi.terwer.space