chore: migrate project to monorepo

This commit is contained in:
cqh963852 committed 2025-07-17 10:35:02 +08:00
1 parent 47dd739a28
commit 9195a387b2
125 files changed
+1477 -1363

No files matched your search

+15 -10
View File
@@ -2,28 +2,33 @@ name: Deploy to GitHub Pages
on: on:
push: push:
branches: [main] branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs: jobs:
build: build:
name: Build and Upload Static Files name: Build Docusaurus
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 18
cache: yarn cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Build website - name: Build website
working-directory: ./ run: yarn workspace stack-idealjs build
run: | - name: Upload Build Artifact
yarn install --immutable
yarn build
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3
with: with:
path: build path: packages/stack-idealjs/build
deploy: deploy:
name: Deploy to GitHub Pages name: Deploy to GitHub Pages
-3
View File
@@ -1,3 +0,0 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
-78
View File
@@ -1,78 +0,0 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const { themes } = require("prism-react-renderer");
const lightTheme = themes.github;
const darkTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "全栈工程师教程",
tagline: "轻松的学习",
url: "https://idealjs.github.io",
baseUrl: "/full-stack-tutorial/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "idealjs",
projectName: "full-stack-tutorial",
trailingSlash: false,
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://github.com/idealjs/full-stack-tutorial/tree/main/",
},
blog: {
showReadingTime: true,
editUrl: "https://github.com/idealjs/full-stack-tutorial/tree/main/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: "全栈工程师教程",
logo: {
alt: "My Site Logo",
src: "img/logo.svg",
},
items: [
{
type: "doc",
docId: "index",
position: "left",
label: "快速开始",
},
{ to: "blog", label: "博客", position: "left" },
{
href: "https://github.com/idealjs/full-stack-tutorial",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [],
copyright: `Copyright © ${new Date().getFullYear()} idealjs.com. Built with Docusaurus.`,
},
prism: {
theme: lightTheme,
darkTheme: darkTheme,
additionalLanguages: ["bash", "diff", "json"],
},
}),
};
module.exports = config;
+4 -39
View File
@@ -1,44 +1,9 @@
{ {
"name": "full-stack-tutorial",
"version": "0.0.0",
"private": true, "private": true,
"scripts": { "workspaces": [
"docusaurus": "docusaurus", "packages/*",
"start": "docusaurus start", "examples/*",
"build": "docusaurus build", "apps/*"
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "^3.8.1",
"@docusaurus/preset-classic": "^3.8.1",
"@mdx-js/react": "^3.1.0",
"clsx": "^2.1.1",
"prism-react-renderer": "^2.4.1",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.8.1",
"@docusaurus/tsconfig": "3.0.0",
"typescript": "^5.8.3"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
], ],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"packageManager": "yarn@4.9.2" "packageManager": "yarn@4.9.2"
} }
+20
View File
@@ -0,0 +1,20 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+41
View File
@@ -0,0 +1,41 @@
# Website
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
## Installation
```bash
yarn
```
## Local Development
```bash
yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
## Build
```bash
yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
## Deployment
Using SSH:
```bash
USE_SSH=true yarn deploy
```
Not using SSH:
```bash
GIT_USER=<Your GitHub username> yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 125 files, more files were not shown because too many files have changed in this diff. Show more