prev-cli 0.12.0 → 0.12.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +22 -10
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -977,13 +977,10 @@ function printHelp() {
977
977
  prev - Zero-config documentation site generator
978
978
 
979
979
  Usage:
980
- prev [command] [options]
981
-
982
- Commands:
983
- dev Start development server (default)
984
- build Build for production
985
- preview Preview production build
986
- clean Remove old cache directories
980
+ prev [options] Start development server
981
+ prev build [options] Build for production
982
+ prev preview [options] Preview production build
983
+ prev clean [options] Remove old cache directories
987
984
 
988
985
  Options:
989
986
  -c, --cwd <path> Set working directory
@@ -992,12 +989,27 @@ Options:
992
989
  -d, --days <days> Cache age threshold for clean (default: 30)
993
990
  -h, --help Show this help message
994
991
 
992
+ Previews:
993
+ Create interactive previews in your docs by adding React components
994
+ to the previews/ directory:
995
+
996
+ previews/
997
+ my-demo/
998
+ App.tsx # React component (entry)
999
+ styles.css # Optional CSS
1000
+
1001
+ Then embed in MDX:
1002
+ import { Preview } from '@prev/theme'
1003
+ <Preview src="my-demo" />
1004
+
1005
+ Previews are bundled via esbuild-wasm in dev, and pre-compiled
1006
+ to standalone HTML files in production builds.
1007
+
995
1008
  Examples:
996
1009
  prev Start dev server on random port
997
- prev dev -p 3000 Start dev server on port 3000
1010
+ prev -p 3000 Start dev server on port 3000
998
1011
  prev build Build static site to ./dist
999
- prev dev -i .c3 Include .c3 directory in docs
1000
- prev dev -i .c3 -i .notes Include multiple dot directories
1012
+ prev -i .c3 Include .c3 directory in docs
1001
1013
  prev clean -d 7 Remove caches older than 7 days
1002
1014
  `);
1003
1015
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prev-cli",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Transform MDX directories into beautiful documentation websites",
5
5
  "type": "module",
6
6
  "license": "MIT",