setup-vibeflow 0.2.0 → 0.3.0

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/index.js +41 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -62,6 +62,26 @@ const EDITIONS = {
62
62
 
63
63
  const DUPLICATE_MARKER = 'vibeflow-architect';
64
64
 
65
+ const GITIGNORE_MARKER = '# Vibeflow — installed + generated (remove to track in git)';
66
+
67
+ const GITIGNORE_BLOCKS = {
68
+ copilot: `
69
+ # Vibeflow — installed + generated (remove to track in git)
70
+ .vibeflow/
71
+ .github/prompts/vibeflow-*.prompt.md
72
+ .github/agents/vibeflow-architect.agent.md
73
+ .github/skills/vibeflow-spec-driven-dev/
74
+ .github/instructions/vibeflow/
75
+ `,
76
+ cursor: `
77
+ # Vibeflow — installed + generated (remove to track in git)
78
+ .vibeflow/
79
+ .cursor/rules/vibeflow.mdc
80
+ .cursor/rules/vibeflow-architect.mdc
81
+ .cursor/skills/vibeflow-*/
82
+ `,
83
+ };
84
+
65
85
  // --- Helpers ---
66
86
 
67
87
  function log(icon, msg) {
@@ -239,6 +259,27 @@ async function main() {
239
259
  }
240
260
  }
241
261
 
262
+ // Append Vibeflow paths to .gitignore (default: do not track; user can remove to track)
263
+ const gitignorePath = join(cwd, '.gitignore');
264
+ try {
265
+ const block = GITIGNORE_BLOCKS[editionKey];
266
+ if (block) {
267
+ let content = '';
268
+ if (existsSync(gitignorePath)) {
269
+ content = readFileSync(gitignorePath, 'utf-8');
270
+ }
271
+ if (!content.includes(GITIGNORE_MARKER)) {
272
+ const updated = (content.trimEnd() ? content.trimEnd() + '\n' : '') + block.trim() + '\n';
273
+ writeFileSync(gitignorePath, updated, 'utf-8');
274
+ log(pc.green('+'), `.gitignore ${pc.dim('(Vibeflow paths added — remove that block to track in git)')}`);
275
+ } else {
276
+ log(pc.dim('-'), `${pc.dim('.gitignore')} ${pc.dim('(Vibeflow block already present)')}`);
277
+ }
278
+ }
279
+ } catch (err) {
280
+ log(pc.red('x'), `.gitignore — ${err.message}`);
281
+ }
282
+
242
283
  // Summary
243
284
  console.log('');
244
285
  if (created > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "setup-vibeflow",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Install Vibeflow (spec-driven development) in your project",
5
5
  "bin": {
6
6
  "setup-vibeflow": "./index.js"