chiefwiggum 1.3.4 → 1.3.9
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.
- package/dist/cli.cjs +6 -39
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -528,17 +528,8 @@ async function cmdNew(planFile) {
|
|
|
528
528
|
console.log(import_picocolors7.default.bold("Project Setup"));
|
|
529
529
|
console.log();
|
|
530
530
|
console.log(`Working directory: ${import_picocolors7.default.cyan(process.cwd())}`);
|
|
531
|
-
console.log();
|
|
532
|
-
const shouldInit = await confirm2({
|
|
533
|
-
message: "Initialize Chief Wiggum in this directory?",
|
|
534
|
-
initialValue: true
|
|
535
|
-
});
|
|
536
|
-
if (!shouldInit) {
|
|
537
|
-
console.log(import_picocolors7.default.yellow("Aborted."));
|
|
538
|
-
process.exit(0);
|
|
539
|
-
}
|
|
540
|
-
await setupTemplates();
|
|
541
531
|
await setupProjectConfig();
|
|
532
|
+
await setupTemplates();
|
|
542
533
|
if (planFile) {
|
|
543
534
|
if (!(0, import_node_fs3.existsSync)(planFile)) {
|
|
544
535
|
console.log(import_picocolors7.default.red(`Plan file not found: ${planFile}`));
|
|
@@ -641,7 +632,6 @@ async function checkExistingFiles() {
|
|
|
641
632
|
}
|
|
642
633
|
async function setupTemplates() {
|
|
643
634
|
if ((0, import_node_fs3.existsSync)(LOCAL_TEMPLATES_DIR)) {
|
|
644
|
-
console.log(import_picocolors7.default.dim(`Templates already exist at ${LOCAL_TEMPLATES_DIR}`));
|
|
645
635
|
return;
|
|
646
636
|
}
|
|
647
637
|
if (!(0, import_node_fs3.existsSync)(BUNDLED_TEMPLATES_DIR)) {
|
|
@@ -657,7 +647,6 @@ async function setupTemplates() {
|
|
|
657
647
|
}
|
|
658
648
|
async function setupProjectConfig() {
|
|
659
649
|
if ((0, import_node_fs3.existsSync)(CONFIG_FILE)) {
|
|
660
|
-
console.log(import_picocolors7.default.dim(`Config already exists at ${CONFIG_FILE}`));
|
|
661
650
|
return;
|
|
662
651
|
}
|
|
663
652
|
console.log();
|
|
@@ -665,35 +654,13 @@ async function setupProjectConfig() {
|
|
|
665
654
|
message: "Use GitHub Issues to track tasks? (instead of TODO.md)",
|
|
666
655
|
initialValue: false
|
|
667
656
|
});
|
|
657
|
+
const config2 = {
|
|
658
|
+
tracker: useGitHub ? "github" : "todo"
|
|
659
|
+
};
|
|
660
|
+
(0, import_node_fs3.writeFileSync)(CONFIG_FILE, JSON.stringify(config2, null, 2) + "\n");
|
|
661
|
+
console.log(import_picocolors7.default.green(`\u2713 Config saved to ${CONFIG_FILE}`));
|
|
668
662
|
if (useGitHub) {
|
|
669
|
-
const configContent = `# Chief Wiggum Config
|
|
670
|
-
|
|
671
|
-
## Project Tracker
|
|
672
|
-
|
|
673
|
-
github
|
|
674
|
-
|
|
675
|
-
## Notes
|
|
676
|
-
|
|
677
|
-
When project_tracker is set to "github", Chief Wiggum will create GitHub Issues
|
|
678
|
-
instead of using TODO.md for task tracking.
|
|
679
|
-
`;
|
|
680
|
-
(0, import_node_fs3.writeFileSync)(CONFIG_FILE, configContent);
|
|
681
|
-
console.log(import_picocolors7.default.green(`\u2713 Config saved to ${CONFIG_FILE}`));
|
|
682
663
|
console.log(import_picocolors7.default.dim(" Tasks will be created as GitHub Issues."));
|
|
683
|
-
} else {
|
|
684
|
-
const configContent = `# Chief Wiggum Config
|
|
685
|
-
|
|
686
|
-
## Project Tracker
|
|
687
|
-
|
|
688
|
-
todo
|
|
689
|
-
|
|
690
|
-
## Notes
|
|
691
|
-
|
|
692
|
-
When project_tracker is set to "todo", Chief Wiggum uses TODO.md for task tracking.
|
|
693
|
-
Change to "github" to use GitHub Issues instead.
|
|
694
|
-
`;
|
|
695
|
-
(0, import_node_fs3.writeFileSync)(CONFIG_FILE, configContent);
|
|
696
|
-
console.log(import_picocolors7.default.green(`\u2713 Config saved to ${CONFIG_FILE}`));
|
|
697
664
|
}
|
|
698
665
|
console.log();
|
|
699
666
|
}
|