- Replace
example-org
with the actual organization scope, namespace. - Replace
Example Org
with the actual organization name. - Replace
example-org.com
with the actual organization domain. - Replace
example-repo
with the actual repository name. - Customize the
README.md
file. - Customize the
docs/.vitepress/config.ts
file. - Implement the actual features.
-
packages/example-vue-component
-
packages/example-typescript
-
- Clone
- Replace
example-org
with the actual organization scope, namespace. - Replace
Example Org
with the actual organization name. - Replace
example-org.com
with the actual organization domain. - Replace
example-repo
with the actual repository name. pnpm install
pnpm run packages:stub
pnpm run docs:dev
- Change some of the code in the
packages/example-vue-component
andpackages/example-typescript
directories. - To integrate more packages:
- Create a new package in the
packages
directory. For example,packages/example-new-package
. - After completing the development of the new package, run
pnpm run packages:stub
to generate the stubbed files for testing and importing. - Install the new package in the
docs
directory.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 thedocs
directory. 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/vite.config.ts
file asalias
,tsconfig.json
aspaths
in order to import the new package in thedocs
directory. Once you are done, you can import the new package in thedocs
directory. For example,import { yourExportedField } from '@example-org/example-new-package'
. - Build the packages,
pnpm run packages:build
. - Build the documentation,
pnpm run docs:build
. - Publish the packages,
pnpm run packages:publish
.
The project uses unbuild
and vite
to develop and build. With the powerful features offered from jiti
, we no longer need to use Rollup for tedious configuration and then watch the local file changes and bundle the modified and developed the modules without vite
for hot-reload. We can directly run the following command to output the bundled file and get started on development:
pnpm run packages:stub
If you use @antfu/ni
, you can also use the following command:
nr packages:stub
Next, you need to start the the documentation site (with VitePress) for previewing and development. You can use the following command:
pnpm run docs:dev
If you use @antfu/ni
, you can also use the following command:
nr docs:dev
pnpm run packages:build
If you use @antfu/ni
, you can also use the following command:
nr packages:build
To build the documentation and preview site, you can use the following command:
pnpm run docs:build
If you use @antfu/ni
, you can also use the following command:
nr docs:build