@zpress/cli 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +42 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +3 -3
- package/package.json +17 -7
package/LICENSE
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/joggrdocs/zpress/main/assets/banner.svg" alt="zpress" width="90%" />
|
|
3
|
+
<p><strong>CLI for building and serving zpress documentation sites.</strong></p>
|
|
4
|
+
|
|
5
|
+
<a href="https://github.com/joggrdocs/zpress/actions/workflows/ci.yml"><img src="https://github.com/joggrdocs/zpress/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI" /></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/@zpress/cli"><img src="https://img.shields.io/npm/v/@zpress/cli" alt="npm version" /></a>
|
|
7
|
+
<a href="https://github.com/joggrdocs/zpress/blob/main/LICENSE"><img src="https://img.shields.io/github/license/joggrdocs/zpress" alt="License" /></a>
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @zpress/cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Commands
|
|
18
|
+
|
|
19
|
+
| Command | Description |
|
|
20
|
+
| ---------- | ----------------------------------- |
|
|
21
|
+
| `dev` | Start dev server with hot reload |
|
|
22
|
+
| `build` | Build for production |
|
|
23
|
+
| `serve` | Preview production build |
|
|
24
|
+
| `sync` | Sync config to documentation output |
|
|
25
|
+
| `clean` | Remove generated output |
|
|
26
|
+
| `dump` | Dump resolved config for debugging |
|
|
27
|
+
| `setup` | Scaffold a new zpress project |
|
|
28
|
+
| `generate` | Generate assets (banners, icons) |
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx zpress dev # start dev server
|
|
34
|
+
npx zpress build # production build
|
|
35
|
+
npx zpress serve # preview build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
> Most users should install [`@zpress/kit`](https://www.npmjs.com/package/@zpress/kit) instead, which re-exports the CLI alongside config helpers.
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
[MIT](https://github.com/joggrdocs/zpress/blob/main/LICENSE) - Joggr, Inc.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { }
|
package/dist/index.mjs
CHANGED
|
@@ -254,7 +254,7 @@ function buildAssetConfig(config) {
|
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
256
|
const generateCommand = command({
|
|
257
|
-
description: 'Generate banner and
|
|
257
|
+
description: 'Generate banner, logo, and icon SVG assets from project title',
|
|
258
258
|
handler: async (ctx)=>{
|
|
259
259
|
ctx.logger.intro('zpress generate');
|
|
260
260
|
const paths = createPaths(process.cwd());
|
|
@@ -338,7 +338,7 @@ function deriveTitle(cwd) {
|
|
|
338
338
|
}
|
|
339
339
|
function buildConfigTemplate(title) {
|
|
340
340
|
const escaped = title.replaceAll("'", String.raw`\'`);
|
|
341
|
-
return `import { defineConfig } from 'zpress'
|
|
341
|
+
return `import { defineConfig } from '@zpress/kit'
|
|
342
342
|
|
|
343
343
|
export default defineConfig({
|
|
344
344
|
title: '${escaped}',
|
|
@@ -408,7 +408,7 @@ const syncCommand = command({
|
|
|
408
408
|
});
|
|
409
409
|
await cli({
|
|
410
410
|
name: 'zpress',
|
|
411
|
-
version: "0.1.
|
|
411
|
+
version: "0.1.2",
|
|
412
412
|
description: 'CLI for building and serving documentation',
|
|
413
413
|
commands: {
|
|
414
414
|
sync: syncCommand,
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zpress/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "CLI for building and serving zpress documentation sites",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"docs",
|
|
8
|
+
"rspress",
|
|
9
|
+
"zpress"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/joggrdocs/zpress/tree/main/packages/cli#readme",
|
|
12
|
+
"bugs": "https://github.com/joggrdocs/zpress/issues",
|
|
4
13
|
"license": "MIT",
|
|
5
14
|
"repository": {
|
|
6
15
|
"type": "git",
|
|
@@ -16,22 +25,23 @@
|
|
|
16
25
|
"type": "module",
|
|
17
26
|
"exports": {
|
|
18
27
|
".": {
|
|
19
|
-
"types": "./
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
20
29
|
"import": "./dist/index.mjs"
|
|
21
30
|
}
|
|
22
31
|
},
|
|
23
32
|
"publishConfig": {
|
|
24
|
-
"access": "public"
|
|
33
|
+
"access": "public",
|
|
34
|
+
"provenance": true
|
|
25
35
|
},
|
|
26
36
|
"dependencies": {
|
|
27
|
-
"@kidd-cli/core": "^0.
|
|
28
|
-
"@rspress/core": "2.0.5",
|
|
37
|
+
"@kidd-cli/core": "^0.4.0",
|
|
38
|
+
"@rspress/core": "^2.0.5",
|
|
29
39
|
"chokidar": "^5.0.0",
|
|
30
40
|
"es-toolkit": "^1.45.1",
|
|
31
41
|
"ts-pattern": "^5.9.0",
|
|
32
42
|
"zod": "^4.3.6",
|
|
33
|
-
"@zpress/core": "0.1
|
|
34
|
-
"@zpress/ui": "0.1
|
|
43
|
+
"@zpress/core": "0.2.1",
|
|
44
|
+
"@zpress/ui": "0.2.1"
|
|
35
45
|
},
|
|
36
46
|
"devDependencies": {
|
|
37
47
|
"@rslib/core": "^0.20.0",
|