Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
tags: ["v*"]

jobs:
publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
- run: bun install --frozen-lockfile
- run: bun run build
- run: npm publish --provenance --access public
16 changes: 15 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default defineConfig({
| Option | Type | Default | Description |
| ------------- | --------- | --------------- | -------------------------------------- |
| `root` | `string` | `process.cwd()` | Project root directory |
| `outDir` | `string` | `.srcpack` | Output directory for bundles |
| `outDir` | `string` | `.srcpack` | Output directory (relative to root) |
| `emptyOutDir` | `boolean` | `true`\* | Empty output directory before bundling |
| `bundles` | `object` | — | Named bundles (required) |
| `upload` | `object` | — | Upload destination |
Expand All @@ -47,6 +47,20 @@ export default defineConfig({
});
```

### outDir

Output directory for bundle files. Can be absolute or relative to project root.

```ts
export default defineConfig({
root: "./packages/app",
outDir: "dist", // writes to packages/app/dist/
bundles: {
app: "src/**/*",
},
});
```

## Bundle Definitions

Each bundle can be defined in three ways:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "srcpack",
"version": "0.1.13",
"version": "0.1.14",
"description": "Zero-config CLI for bundling code into LLM-optimized context files",
"keywords": [
"llm",
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const ConfigSchema = z.object({
* @default process.cwd()
*/
root: z.string().default(""),
/** Output directory for bundle files. Defaults to ".srcpack". */
/** Output directory for bundle files (relative to root). Defaults to ".srcpack". */
outDir: z.string().default(".srcpack"),
/** Empty outDir before bundling. Auto-enabled when outDir is inside project root. */
emptyOutDir: z.boolean().optional(),
Expand Down