prev-cli 0.12.0 → 0.12.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.
Files changed (2) hide show
  1. package/dist/cli.js +36 -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,41 @@ 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
+
1004
+ <Preview src="my-demo" />
1005
+ <Preview src="my-demo" height={600} />
1006
+ <Preview src="my-demo" title="Counter Demo" />
1007
+
1008
+ Preview props:
1009
+ src Required. Name of the preview folder
1010
+ height Iframe height in pixels (default: 400)
1011
+ title Display title (default: folder name)
1012
+
1013
+ DevTools (floating pill in preview):
1014
+ - Device modes: mobile (375px), tablet (768px), desktop
1015
+ - Custom width slider (320-1920px)
1016
+ - Dark mode toggle
1017
+ - Fullscreen mode
1018
+
1019
+ Previews are bundled via esbuild-wasm in dev, and pre-compiled
1020
+ to standalone HTML files in production builds.
1021
+
995
1022
  Examples:
996
1023
  prev Start dev server on random port
997
- prev dev -p 3000 Start dev server on port 3000
1024
+ prev -p 3000 Start dev server on port 3000
998
1025
  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
1026
+ prev -i .c3 Include .c3 directory in docs
1001
1027
  prev clean -d 7 Remove caches older than 7 days
1002
1028
  `);
1003
1029
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prev-cli",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "Transform MDX directories into beautiful documentation websites",
5
5
  "type": "module",
6
6
  "license": "MIT",