@@ -48,11 +48,14 @@ Or add to `package.json`:
4848
4949### Options
5050
51- | Option | Default | Description |
52- | --------- | ---------- | -------------------------------- |
53- | ` outDir ` | ` .srcpack ` | Output directory for bundles |
54- | ` bundles ` | — | Named bundles with glob patterns |
55- | ` upload ` | — | Upload destination(s) |
51+ | Option | Default | Description |
52+ | ------------- | ---------- | -------------------------------------- |
53+ | ` outDir ` | ` .srcpack ` | Output directory for bundles |
54+ | ` emptyOutDir ` | ` true ` \* | Empty output directory before bundling |
55+ | ` bundles ` | — | Named bundles with glob patterns |
56+ | ` upload ` | — | Upload destination(s) |
57+
58+ \* ` emptyOutDir ` defaults to ` true ` when ` outDir ` is inside project root. When ` outDir ` is outside root, a warning is emitted unless explicitly set.
5659
5760### Bundle Config
5861
@@ -70,7 +73,8 @@ Or add to `package.json`:
7073{
7174 include : " src/**/*" ,
7275 outfile : " ~/Downloads/bundle.txt" , // custom output path
73- index : true // include index header (default)
76+ index : true , // include index header (default)
77+ prompt : " ./prompts/review.md" // prepend from file (or inline text)
7478}
7579```
7680
@@ -90,6 +94,7 @@ export default defineConfig({
9094 folderId: " 1ABC..." , // Google Drive folder ID (from URL)
9195 clientId: " ..." ,
9296 clientSecret: " ..." ,
97+ exclude: [" local" ], // skip specific bundles
9398 },
9499});
95100```
@@ -127,12 +132,14 @@ export function utils() {
127132## CLI
128133
129134``` bash
130- npx srcpack # Bundle all, upload if configured
131- npx srcpack web api # Bundle specific bundles only
132- npx srcpack --dry-run # Preview without writing files
133- npx srcpack --no-upload # Bundle only, skip upload
134- npx srcpack init # Interactive config setup
135- npx srcpack login # Authenticate with Google Drive
135+ npx srcpack # Bundle all, upload if configured
136+ npx srcpack web api # Bundle specific bundles only
137+ npx srcpack --dry-run # Preview without writing files
138+ npx srcpack --emptyOutDir # Empty output directory before bundling
139+ npx srcpack --no-emptyOutDir # Keep existing files in output directory
140+ npx srcpack --no-upload # Bundle only, skip upload
141+ npx srcpack init # Interactive config setup
142+ npx srcpack login # Authenticate with Google Drive
136143```
137144
138145## API
0 commit comments