Skip to content

Commit 5fb0a0d

Browse files
author
catlog22
committed
feat: enhance .npmignore and config.py for better development environment management; update package.json for improved build process; add prepublish-clean script to remove unnecessary artifacts
1 parent 4a5f7ce commit 5fb0a0d

4 files changed

Lines changed: 50 additions & 903 deletions

File tree

.npmignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,27 @@ ccw/*.md
5151

5252
# Python development files
5353
__pycache__/
54+
**/__pycache__/
5455
*.pyc
5556
*.pyo
5657
.venv/
5758
.pytest_cache/
5859
*.egg-info/
5960
.coverage
6061

62+
# Development indexes and caches
63+
.ace-tool/
64+
**/.ace-tool/
65+
66+
# Source maps (optional - remove if you want to ship them)
67+
# *.map
68+
69+
# Workflow runtime data (reinforce)
70+
**/.workflow/
71+
*.db
72+
*.db-shm
73+
*.db-wal
74+
6175
# codex-lens development files
6276
codex-lens/.venv/
6377
codex-lens/.pytest_cache/

ccw/scripts/prepublish-clean.mjs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env node
2+
/**
3+
* Pre-publish cleanup - removes dev artifacts from directories
4+
* that will be included in the npm package via the "files" field.
5+
*/
6+
import { globSync } from 'glob';
7+
import { rmSync } from 'fs';
8+
9+
const patterns = [
10+
'ccw/scripts/__pycache__/**',
11+
'ccw/dist/.ace-tool/**',
12+
'ccw/src/.ace-tool/**',
13+
'codex-lens/src/**/__pycache__/**',
14+
'ccw-litellm/src/**/__pycache__/**',
15+
'codex-lens/src/**/.workflow/**',
16+
'**/.workflow/.cli-history/*.db*',
17+
];
18+
19+
let cleaned = 0;
20+
for (const pattern of patterns) {
21+
const files = globSync(pattern, { ignore: 'node_modules/**', dot: true });
22+
for (const f of files) {
23+
try {
24+
rmSync(f, { force: true });
25+
cleaned++;
26+
} catch { /* skip */ }
27+
}
28+
}
29+
30+
if (cleaned > 0) {
31+
console.log(`[prepublish-clean] Removed ${cleaned} dev artifacts`);
32+
}

0 commit comments

Comments
 (0)