mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
Zeta & UI: Make ESM only
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'next-docs-zeta': patch
|
||||
'next-docs-ui': patch
|
||||
---
|
||||
|
||||
Make ESM only
|
||||
@@ -10,7 +10,7 @@ This monorepo includes three packages.
|
||||
|
||||
### Next Docs Zeta
|
||||
|
||||
The headless UI library for building docuementation websites.
|
||||
The headless UI library for building documentation websites.
|
||||
|
||||
It includes necessary parts such as TOC, Sidebar, and some useful utilities.
|
||||
|
||||
@@ -20,7 +20,7 @@ npm install next-docs-zeta
|
||||
|
||||
### Next Docs UI
|
||||
|
||||
The framework built on top of Next Docs Zeta. It offers many out-of-the-box
|
||||
The framework is built on top of Next Docs Zeta. It offers many out-of-the-box
|
||||
features along with a well-designed user interface.
|
||||
|
||||
```bash
|
||||
@@ -35,6 +35,10 @@ A CLI tool that generates documentation sites.
|
||||
npx create next-docs-app
|
||||
```
|
||||
|
||||
### Compatiability
|
||||
|
||||
All packages are **ESM only**.
|
||||
|
||||
## Contributions
|
||||
|
||||
We are welcome for contributions! You may start with contributing to the docs,
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "turbo run build --filter=./packages/\\*",
|
||||
"build": "turbo run build --filter=./packages/*",
|
||||
"clean": "turbo run clean",
|
||||
"dev": "turbo run dev",
|
||||
"dev:all": "turbo run dev --filter=docs...",
|
||||
"dev:all": "turbo run dev --filter=!./examples/*",
|
||||
"dev:examples": "turbo run dev --filter=./examples/*",
|
||||
"lint": "eslint --cache --ignore-path .gitignore --max-warnings 0 .",
|
||||
"lint:prettier": "prettier --cache --check --ignore-path .gitignore --ignore-path .prettierignore .",
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
"@types/react-dom": "18.2.1",
|
||||
"algoliasearch": "^4.20.0",
|
||||
"autoprefixer": "10.4.16",
|
||||
"contentlayer": "^0.3.4",
|
||||
"next": "14.0.3",
|
||||
"postcss": "8.4.31",
|
||||
"postcss-cli": "^10.1.0",
|
||||
|
||||
@@ -8,7 +8,6 @@ export default defineConfig({
|
||||
'./src/{i18n,layout,mdx,mdx-server,nav,not-found,page,provider}.{ts,tsx}'
|
||||
],
|
||||
outExtension: () => ({ js: '.js' }),
|
||||
external: ['next-docs-zeta'],
|
||||
format: 'esm',
|
||||
dts: true,
|
||||
target: tsconfig.compilerOptions.target as 'es2022'
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"homepage": "https://next-docs-zeta.vercel.app",
|
||||
"author": "Fuma Nama",
|
||||
"repository": "github:fuma-nama/next-docs",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist/*"
|
||||
@@ -12,51 +13,51 @@
|
||||
"exports": {
|
||||
"./sidebar": {
|
||||
"import": "./dist/sidebar.js",
|
||||
"types": "./dist/sidebar.d.mts"
|
||||
"types": "./dist/sidebar.d.ts"
|
||||
},
|
||||
"./breadcrumb": {
|
||||
"import": "./dist/breadcrumb.js",
|
||||
"types": "./dist/breadcrumb.d.mts"
|
||||
"types": "./dist/breadcrumb.d.ts"
|
||||
},
|
||||
"./toc": {
|
||||
"import": "./dist/toc.js",
|
||||
"types": "./dist/toc.d.mts"
|
||||
"types": "./dist/toc.d.ts"
|
||||
},
|
||||
"./search/client": {
|
||||
"import": "./dist/search/client.js",
|
||||
"types": "./dist/search/client.d.mts"
|
||||
"types": "./dist/search/client.d.ts"
|
||||
},
|
||||
"./search/server": {
|
||||
"import": "./dist/search/server.js",
|
||||
"types": "./dist/search/server.d.ts"
|
||||
},
|
||||
"./server": {
|
||||
"import": "./dist/server.mjs",
|
||||
"types": "./dist/server.d.mts"
|
||||
"import": "./dist/server.js",
|
||||
"types": "./dist/server.d.ts"
|
||||
},
|
||||
"./link": {
|
||||
"import": "./dist/link.js",
|
||||
"types": "./dist/link.d.mts"
|
||||
"types": "./dist/link.d.ts"
|
||||
},
|
||||
"./contentlayer": {
|
||||
"import": "./dist/contentlayer/index.mjs",
|
||||
"types": "./dist/contentlayer/index.d.mts"
|
||||
"import": "./dist/contentlayer/index.js",
|
||||
"types": "./dist/contentlayer/index.d.ts"
|
||||
},
|
||||
"./contentlayer/configuration": {
|
||||
"import": "./dist/contentlayer/configuration.mjs",
|
||||
"types": "./dist/contentlayer/configuration.d.mts"
|
||||
"import": "./dist/contentlayer/configuration.js",
|
||||
"types": "./dist/contentlayer/configuration.d.ts"
|
||||
},
|
||||
"./middleware": {
|
||||
"import": "./dist/middleware.js",
|
||||
"types": "./dist/middleware.d.ts"
|
||||
},
|
||||
"./mdx-plugins": {
|
||||
"import": "./dist/mdx-plugins.mjs",
|
||||
"types": "./dist/mdx-plugins.d.mts"
|
||||
"import": "./dist/mdx-plugins.js",
|
||||
"types": "./dist/mdx-plugins.d.ts"
|
||||
},
|
||||
"./search-algolia/client": {
|
||||
"import": "./dist/search-algolia/client.js",
|
||||
"types": "./dist/search-algolia/client.d.mts"
|
||||
"types": "./dist/search-algolia/client.d.ts"
|
||||
},
|
||||
"./search-algolia/server": {
|
||||
"import": "./dist/search-algolia/server.js",
|
||||
@@ -66,16 +67,16 @@
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"sidebar": [
|
||||
"./dist/sidebar.d.mts"
|
||||
"./dist/sidebar.d.ts"
|
||||
],
|
||||
"breadcrumb": [
|
||||
"./dist/breadcrumb.d.mts"
|
||||
"./dist/breadcrumb.d.ts"
|
||||
],
|
||||
"toc": [
|
||||
"./dist/toc.d.mts"
|
||||
"./dist/toc.d.ts"
|
||||
],
|
||||
"search/client": [
|
||||
"./dist/search/client.d.mts"
|
||||
"./dist/search/client.d.ts"
|
||||
],
|
||||
"search/shared": [
|
||||
"./dist/search/shared.d.ts"
|
||||
@@ -84,25 +85,25 @@
|
||||
"./dist/search/server.d.ts"
|
||||
],
|
||||
"server": [
|
||||
"./dist/server.d.mts"
|
||||
"./dist/server.d.ts"
|
||||
],
|
||||
"link": [
|
||||
"./dist/link.d.mts"
|
||||
"./dist/link.d.ts"
|
||||
],
|
||||
"contentlayer": [
|
||||
"./dist/contentlayer/index.d.mts"
|
||||
"./dist/contentlayer/index.d.ts"
|
||||
],
|
||||
"contentlayer/configuration": [
|
||||
"./dist/contentlayer/configuration.d.mts"
|
||||
"./dist/contentlayer/configuration.d.ts"
|
||||
],
|
||||
"middleware": [
|
||||
"./dist/middleware.d.ts"
|
||||
],
|
||||
"mdx-plugins": [
|
||||
"./dist/mdx-plugins.d.mts"
|
||||
"./dist/mdx-plugins.d.ts"
|
||||
],
|
||||
"search-algolia/client": [
|
||||
"./dist/search-algolia/client.d.mts"
|
||||
"./dist/search-algolia/client.d.ts"
|
||||
],
|
||||
"search-algolia/server": [
|
||||
"./dist/search-algolia/server.d.ts"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineConfig } from 'tsup'
|
||||
import tsconfig from './tsconfig.json'
|
||||
|
||||
const shared = {
|
||||
export default defineConfig({
|
||||
external: [
|
||||
'@algolia/client-search',
|
||||
'algoliasearch',
|
||||
@@ -9,37 +9,15 @@ const shared = {
|
||||
'unified'
|
||||
],
|
||||
dts: true,
|
||||
target: tsconfig.compilerOptions.target as 'es2016'
|
||||
}
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
...shared,
|
||||
format: 'esm',
|
||||
name: 'next-docs-client',
|
||||
entry: [
|
||||
'src/{toc,link,breadcrumb,sidebar,dynamic-link}.tsx',
|
||||
'src/{search,search-algolia}/client.ts'
|
||||
],
|
||||
outExtension: () => ({ js: '.js' })
|
||||
},
|
||||
{
|
||||
...shared,
|
||||
format: 'esm',
|
||||
name: 'next-docs-esm',
|
||||
entry: [
|
||||
'src/{server,mdx-plugins}.ts',
|
||||
'src/contentlayer/{index,configuration}.ts'
|
||||
]
|
||||
},
|
||||
{
|
||||
...shared,
|
||||
name: 'next-docs-cjs',
|
||||
entry: [
|
||||
'src/{search,search-algolia}/server.ts',
|
||||
'src/search/shared.ts',
|
||||
'src/middleware.ts'
|
||||
],
|
||||
format: 'cjs'
|
||||
}
|
||||
])
|
||||
target: tsconfig.compilerOptions.target as 'es2016',
|
||||
format: 'esm',
|
||||
entry: [
|
||||
'src/{toc,link,breadcrumb,sidebar,dynamic-link}.tsx',
|
||||
'src/{server,mdx-plugins}.ts',
|
||||
'src/contentlayer/{index,configuration}.ts',
|
||||
'src/{search,search-algolia}/{client,server}.ts',
|
||||
'src/search/shared.ts',
|
||||
'src/middleware.ts'
|
||||
],
|
||||
outExtension: () => ({ js: '.js' })
|
||||
})
|
||||
|
||||
Generated
-3
@@ -502,9 +502,6 @@ importers:
|
||||
autoprefixer:
|
||||
specifier: 10.4.16
|
||||
version: 10.4.16([email protected])
|
||||
contentlayer:
|
||||
specifier: ^0.3.4
|
||||
version: 0.3.4
|
||||
next:
|
||||
specifier: 14.0.3
|
||||
version: 14.0.3(@babel/[email protected])([email protected])([email protected])
|
||||
|
||||
+1
-4
@@ -8,10 +8,7 @@
|
||||
"!.contentlayer/.cache/**",
|
||||
".next/**",
|
||||
"!.next/cache/**",
|
||||
"dist/**/*.d.ts",
|
||||
"dist/**/*.mjs",
|
||||
"dist/**/*.js",
|
||||
"dist/**/*.css"
|
||||
"dist/**"
|
||||
]
|
||||
},
|
||||
"test": {},
|
||||
|
||||
Reference in New Issue
Block a user