Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/dull-jeans-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@alauda/doom-export": minor
"@alauda/doom": minor
---

feat: migrate to mono repo
2 changes: 1 addition & 1 deletion .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
run: yarn build

- name: Publish
run: yarn dlx pkg-pr-new publish --compact --packageManager=yarn
run: yarn dlx pkg-pr-new publish './packages/*' --packageManager=yarn # --compact
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.yarn
pyodide
**/pyodide
# too big
fixture-docs/shared/crds/operator.tekton.dev_*.yaml
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import doom from '@alauda/doom/eslint'

export default config(
{
ignores: ['dist', 'lib', 'pyodide'],
ignores: ['dist', '**/lib', '**/pyodide'],
},
...(await doom(new URL('docs', import.meta.url))),
eslint.configs.recommended,
Expand Down
130 changes: 15 additions & 115 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,135 +1,37 @@
{
"name": "@alauda/doom",
"name": "alauda-doom",
"version": "1.10.12",
"type": "module",
"description": "Doctor Doom making docs.",
"repository": "git+https://github.com/alauda/doom.git",
"homepage": "https://github.com/alauda/doom#readme",
"license": "MIT",
"packageManager": "yarn@4.9.3",
"engines": {
"node": ">=18.17.0 <20 || >=20.1.0"
},
"bin": "lib/cli/index.js",
"exports": {
"./package.json": "./package.json",
"./config": "./lib/config.js",
"./cspell": "./lib/cspell.js",
"./eslint": "./lib/eslint.js",
"./runtime": "./lib/runtime/index.js",
"./theme": "./lib/theme.js",
"./types": "./lib/types.js"
},
"files": [
"assets",
"global.d.ts",
"lib",
"pyodide",
"styles",
"!lib/*.tsbuildinfo"
],
"keywords": [
"document",
"documentation",
"docs",
"mdx",
"rspress",
"rspress-plugins"
"private": true,
"workspaces": [
"packages/*"
],
"packageManager": "yarn@4.9.3",
"scripts": {
"build": "tsc -b src",
"clean": "tsc -b src --clean",
"dev": "yarn swc-node --watch-path src/cli --watch-path src/plugins src/cli/index.ts",
"build": "tsc -b",
"clean": "tsc -b --clean",
"dev": "yarn swc-node --watch-path packages/doom/src/cli --watch-path packages/doom/src/plugins packages/doom/src/cli/index.ts",
"docs": "run-s docs:build docs:export",
"docs:build": "yarn doom build",
"docs:export": "yarn doom export",
"doom": "yarn swc-node src/cli/index.ts",
"doom": "yarn swc-node packages/doom/src/cli/index.ts",
"fixture": "yarn dev fixture-docs",
"format": "prettier --write .",
"lint": "run-p 'lint:*'",
"lint:es": "eslint .",
"lint:tsc": "tsc -b",
"prepare": "simple-git-hooks && patch-package && yarn-berry-deduplicate || exit 0",
"release": "yarn build && clean-pkg-json && changeset publish",
"release": "yarn build && changeset publish",
"serve": "yarn doom serve",
"swc-node": "node --enable-source-maps --import @swc-node/register/esm-register",
"translate": "yarn doom translate -s zh -t en",
"typecov": "type-coverage",
"version": "changeset version && yarn --no-immutable"
},
"dependencies": {
"@cspell/eslint-plugin": "^8.19.4 || ^9.2.0",
"@eslint-react/eslint-plugin": "^1.52.6",
"@inquirer/prompts": "^7.8.4",
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
"@playwright/browser-chromium": "^1.55.0",
"@rsbuild/plugin-react": "^1.3.5",
"@rsbuild/plugin-sass": "^1.3.5",
"@rsbuild/plugin-svgr": "^1.2.2",
"@rsbuild/plugin-yaml": "^1.0.3",
"@rspress/core": "2.0.0-beta.28",
"@rspress/plugin-algolia": "2.0.0-beta.28",
"@rspress/plugin-llms": "2.0.0-beta.28",
"@rspress/plugin-sitemap": "2.0.0-beta.28",
"@rspress/shared": "2.0.0-beta.28",
"@shikijs/transformers": "^3.11.0",
"@total-typescript/ts-reset": "^0.6.1",
"chokidar": "^4.0.3",
"cli-progress": "^3.12.0",
"clsx": "^2.1.1",
"commander": "^13.1.0 || ^14.0.0",
"ejs": "^3.1.10",
"es-toolkit": "^1.39.10",
"eslint": "^9.34.0",
"eslint-plugin-mdx": "^3.6.2",
"globals": "^16.3.0",
"html-tag-names": "^2.1.0",
"md-attr-parser": "^1.3.0",
"mdast-util-mdx": "^3.0.0",
"mdast-util-mdx-jsx": "^3.2.0",
"mdast-util-phrasing": "^4.1.0",
"mdast-util-to-markdown": "^2.1.2",
"mdast-util-to-string": "^4.0.0",
"mermaid": "^11.10.1",
"openai": "^5.15.0",
"openapi-types": "^12.1.3",
"p-ratelimit": "^1.0.1",
"pdf-lib": "^1.17.1",
"pdf-merger-js": "^5.1.2",
"picomatch": "^4.0.3",
"playwright": "^1.55.0",
"pluralize": "^8.0.0",
"react-markdown": "^10.1.0",
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"remark-directive": "^4.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.1",
"remark-lint-code-block-split-list": "^1.0.0",
"remark-lint-heading-increment": "^4.0.1",
"remark-lint-match-punctuation": "^0.2.1",
"remark-lint-no-chinese-punctuation-in-number": "^0.1.2",
"remark-lint-no-duplicate-headings-in-section": "^4.0.1",
"remark-lint-no-hidden-table-cell": "^1.0.1",
"remark-mdx": "^3.1.0",
"remark-message-control": "^8.0.0",
"remark-stringify": "^11.0.0",
"shiki": "^3.11.0",
"simple-git": "^3.28.0",
"string-width": "^7.2.0",
"swagger2openapi": "^7.0.8",
"tinyglobby": "^0.2.14",
"type-fest": "^4.41.0",
"typescript": "^5.9.2",
"typescript-eslint": "^8.40.0",
"unified": "^11.0.5",
"unified-lint-rule": "^3.0.1",
"unist-util-position": "^5.0.0",
"unist-util-visit-parents": "^6.0.1",
"x-fetch": "^0.2.6",
"yaml": "^2.8.1",
"yoctocolors": "^2.1.2"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.6",
Expand All @@ -143,10 +45,10 @@
"@types/picomatch": "^4.0.2",
"@types/pluralize": "^0.0.33",
"@types/react": "^19.1.11",
"@types/react-dom": "^19.1.7",
"@types/react-dom": "^19.1.8",
"@types/swagger2openapi": "^7.0.4",
"@unts/patch-package": "^8.1.1",
"clean-pkg-json": "^1.3.0",
"eslint": "^9.34.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import-x": "^4.16.1",
"eslint-plugin-react-hooks": "^5.2.0",
Expand All @@ -158,19 +60,17 @@
"prettier-plugin-properties": "^0.3.0",
"simple-git-hooks": "^2.13.1",
"type-coverage": "^2.29.7",
"typescript": "^5.9.2",
"yarn-berry-deduplicate": "^6.1.3"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"typeCoverage": {
"atLeast": 100,
"cache": true,
"detail": true,
"ignoreAsAssertion": true,
"ignoreFiles": [
"lib/**/*.d.ts",
"pyodide/**/*.d.ts"
"**/lib/**/*.d.ts",
"**/pyodide/**/*.d.ts"
],
"ignoreNonNullAssertion": true,
"showRelativePath": true,
Expand Down
File renamed without changes
File renamed without changes.
110 changes: 110 additions & 0 deletions packages/doom/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"name": "@alauda/doom",
"version": "1.10.12",
"type": "module",
"description": "Doctor Doom making docs.",
"repository": {
"type": "git",
"url": "https://github.com/alauda/doom.git",
"directory": "packages/doom"
},
"homepage": "https://github.com/alauda/doom#readme",
"license": "MIT",
"engines": {
"node": ">=18.17.0 <20 || >=20.1.0"
},
"bin": "lib/cli/index.js",
"exports": {
"./config": "./lib/config.js",
"./cspell": "./lib/cspell.js",
"./eslint": "./lib/eslint.js",
"./runtime": "./lib/runtime/index.js",
"./theme": "./lib/theme.js",
"./types": "./lib/types.js",
"./package.json": "./package.json"
},
"files": [
"assets",
"global.d.ts",
"lib",
"styles"
],
"keywords": [
"document",
"documentation",
"docs",
"mdx",
"rspress",
"rspress-plugins"
],
"dependencies": {
"@alauda/doom-export": "^0.0.0",
"@cspell/eslint-plugin": "^8.19.4 || ^9.2.0",
"@eslint-react/eslint-plugin": "^1.52.6",
"@inquirer/prompts": "^7.8.4",
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
"@playwright/browser-chromium": "^1.55.0",
"@rsbuild/plugin-react": "^1.3.5",
"@rsbuild/plugin-sass": "^1.3.5",
"@rsbuild/plugin-svgr": "^1.2.2",
"@rsbuild/plugin-yaml": "^1.0.3",
"@rspress/core": "2.0.0-beta.28",
"@rspress/plugin-algolia": "2.0.0-beta.28",
"@rspress/plugin-llms": "2.0.0-beta.28",
"@rspress/plugin-sitemap": "2.0.0-beta.28",
"@rspress/shared": "2.0.0-beta.28",
"@shikijs/transformers": "^3.11.0",
"@total-typescript/ts-reset": "^0.6.1",
"chokidar": "^4.0.3",
"clsx": "^2.1.1",
"commander": "^13.1.0 || ^14.0.0",
"ejs": "^3.1.10",
"es-toolkit": "^1.39.10",
"eslint": "^9.34.0",
"eslint-plugin-mdx": "^3.6.2",
"globals": "^16.3.0",
"html-tag-names": "^2.1.0",
"md-attr-parser": "^1.3.0",
"mdast-util-mdx": "^3.0.0",
"mdast-util-mdx-jsx": "^3.2.0",
"mdast-util-phrasing": "^4.1.0",
"mdast-util-to-markdown": "^2.1.2",
"mdast-util-to-string": "^4.0.0",
"mermaid": "^11.10.1",
"openai": "^5.15.0",
"openapi-types": "^12.1.3",
"p-ratelimit": "^1.0.1",
"picomatch": "^4.0.3",
"pluralize": "^8.0.0",
"react-markdown": "^10.1.0",
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"remark-directive": "^4.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.1",
"remark-lint-code-block-split-list": "^1.0.0",
"remark-lint-heading-increment": "^4.0.1",
"remark-lint-match-punctuation": "^0.2.1",
"remark-lint-no-chinese-punctuation-in-number": "^0.1.2",
"remark-lint-no-duplicate-headings-in-section": "^4.0.1",
"remark-lint-no-hidden-table-cell": "^1.0.1",
"remark-mdx": "^3.1.0",
"remark-message-control": "^8.0.0",
"remark-stringify": "^11.0.0",
"shiki": "^3.11.0",
"simple-git": "^3.28.0",
"string-width": "^7.2.0",
"swagger2openapi": "^7.0.8",
"tinyglobby": "^0.2.14",
"type-fest": "^4.41.0",
"typescript": "^5.9.2",
"typescript-eslint": "^8.41.0",
"unified": "^11.0.5",
"unified-lint-rule": "^3.0.1",
"unist-util-position": "^5.0.0",
"unist-util-visit-parents": "^6.0.1",
"x-fetch": "^0.2.6",
"yaml": "^2.8.1",
"yoctocolors": "^2.1.2"
}
}
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/cli/export.ts → packages/doom/src/cli/export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import fs from 'node:fs/promises'
import path from 'node:path'

import {
generatePdf,
type GeneratePdfOptions,
type Page,
type PDFOutline,
} from '@alauda/doom-export'
import { logger, serve } from '@rspress/core'
import { removeLeadingSlash } from '@rspress/shared'
import { Command } from 'commander'
Expand All @@ -16,12 +22,6 @@ import { getPdfName } from '../shared/index.js'
import type { GlobalCliOptions, ServeOptions } from '../types.js'
import { pathExists, setNodeEnv } from '../utils/index.js'

import {
generatePdf,
type GeneratePdfOptions,
type Page,
type PDFOutline,
} from './export-pdf-core/index.js'
import { loadConfig } from './load-config.js'

const collectPages = (sidebarItems: DoomSidebar[], base: string) => {
Expand Down
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.
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.
10 changes: 10 additions & 0 deletions packages/doom/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"composite": true,
"noEmit": false,
"outDir": "lib",
"rootDir": "src"
},
"include": ["src"]
}
32 changes: 32 additions & 0 deletions packages/export/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@alauda/doom-export",
"version": "0.0.0",
"type": "module",
"description": "Doctor Doom making docs.",
"repository": {
"type": "git",
"url": "https://github.com/alauda/doom.git",
"directory": "packages/export"
},
"homepage": "https://github.com/alauda/doom#readme",
"license": "MIT",
"engines": {
"node": ">=18.17.0 <20 || >=20.1.0"
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
},
"files": [
"lib",
"pyodide"
],
"dependencies": {
"cli-progress": "^3.12.0",
"html-entities": "^2.6.0",
"pdf-lib": "^1.17.1",
"pdf-merger-js": "^5.1.2",
"playwright": "^1.55.0",
"yoctocolors": "^2.1.2"
}
}
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.
Loading
Loading