- Replace
example-orgwith the actual organization scope, namespace. - Replace
Example Orgwith the actual organization name. - Replace
example-org.comwith the actual organization domain. - Replace
example-repowith the actual repository name. - Customize the
README.mdfile. - Customize the
docs/.vitepress/config.tsfile. - Implement the actual features.
-
packages/example-vue-component -
packages/example-typescript
-
- Clone
- Replace
example-orgwith the actual organization scope, namespace. - Replace
Example Orgwith the actual organization name. - Replace
example-org.comwith the actual organization domain. - Replace
example-repowith the actual repository name. pnpm installpnpm run dev:docs- Change some of the code in the
packages/example-vue-componentandpackages/example-typescriptdirectories. - To integrate more packages:
- Create a new package in the
packagesdirectory. For example,packages/example-new-package. - After completing the development of the new package, run
pnpm installto rebuild for testing and importing. - Install the new package in the
docsdirectory.pnpm install -F @example-org/docs @example-org/example-new-package. - If it's a pure TypeScript module without the need to integrate to run after any extra bundling (Vite,
vite-node, etc.), you can now import the new package in thedocsdirectory. For example,import { yourExportedField } from '@example-org/example-new-package'. - If it's a Vue component, or a module that requires bundling and transforming, you need to add the new package to the
docs/.vitepress/config.tsfile asalias,tsconfig.jsonaspathsin order to import the new package in thedocsdirectory underviteproperty. Once you are done, you can import the new package in thedocsdirectory. For example,import { yourExportedField } from '@example-org/example-new-package'. - Build the packages,
pnpm run build:packages. - Build the documentation,
pnpm run build:docs. - Publish the packages,
pnpm publish -r --access public --no-git-checks.
git clone [email protected]:example-org/example-repo.git
cd example-repo
pnpm install
pnpm run dev:docsIf you use @antfu/ni, you can also use the following command:
nr dev:docsTo build the documentation and preview site, you can use the following command:
pnpm run build:docsIf you use @antfu/ni, you can also use the following command:
nr build:docs