crg-dev-kit 2.0.3 → 2.0.4
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/assets/setup-crg.sh +14 -4
- package/lib/actions.js +15 -1
- package/package.json +1 -1
- package/server.js +1 -1
- /package/assets/{README.md → CRG-README.md} +0 -0
package/assets/setup-crg.sh
CHANGED
|
@@ -178,11 +178,21 @@ if $INSTALL_EMBEDDINGS; then
|
|
|
178
178
|
fi
|
|
179
179
|
fi
|
|
180
180
|
|
|
181
|
-
# ── Step 6: Add .gitignore
|
|
181
|
+
# ── Step 6: Add .gitignore entries ──
|
|
182
182
|
if [ -f ".gitignore" ]; then
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
IGNORE_ENTRIES=(".code-review-graph/" "setup-crg.sh" "setup-crg.ps1" "check-crg.sh" "crg-cheatsheet.pdf" "CRG-README.md")
|
|
184
|
+
ADDED=0
|
|
185
|
+
for entry in "${IGNORE_ENTRIES[@]}"; do
|
|
186
|
+
if ! grep -qxF "$entry" .gitignore 2>/dev/null; then
|
|
187
|
+
if [ $ADDED -eq 0 ]; then
|
|
188
|
+
echo -e "\n# code-review-graph" >> .gitignore
|
|
189
|
+
fi
|
|
190
|
+
echo "$entry" >> .gitignore
|
|
191
|
+
ADDED=$((ADDED + 1))
|
|
192
|
+
fi
|
|
193
|
+
done
|
|
194
|
+
if [ $ADDED -gt 0 ]; then
|
|
195
|
+
ok "Added $ADDED entries to .gitignore"
|
|
186
196
|
fi
|
|
187
197
|
fi
|
|
188
198
|
|
package/lib/actions.js
CHANGED
|
@@ -12,7 +12,7 @@ const INSTALL_FILES = [
|
|
|
12
12
|
{ name: 'check-crg.sh', executable: true, label: 'Health check script' },
|
|
13
13
|
{ name: 'CLAUDE.md', executable: false, label: 'AI configuration' },
|
|
14
14
|
{ name: 'crg-cheatsheet.pdf', executable: false, label: 'Cheatsheet PDF' },
|
|
15
|
-
{ name: 'README.md', executable: false, label: 'Documentation' },
|
|
15
|
+
{ name: 'CRG-README.md', executable: false, label: 'Documentation' },
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
function install(targetDir, trackROI = true) {
|
|
@@ -38,6 +38,20 @@ function install(targetDir, trackROI = true) {
|
|
|
38
38
|
copied++;
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
+
// Add copied files to .gitignore
|
|
42
|
+
if (copied > 0) {
|
|
43
|
+
const gitignorePath = path.join(targetDir, '.gitignore');
|
|
44
|
+
if (fs.existsSync(gitignorePath)) {
|
|
45
|
+
let content = fs.readFileSync(gitignorePath, 'utf8');
|
|
46
|
+
const filesToIgnore = INSTALL_FILES.map(f => f.name)
|
|
47
|
+
.filter(name => !content.split('\n').some(line => line.trim() === name));
|
|
48
|
+
if (filesToIgnore.length > 0) {
|
|
49
|
+
const block = '\n# crg-dev-kit assets\n' + filesToIgnore.join('\n') + '\n';
|
|
50
|
+
fs.appendFileSync(gitignorePath, block);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
41
55
|
if (trackROI) {
|
|
42
56
|
roi.setInstallDate(targetDir);
|
|
43
57
|
}
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -513,7 +513,7 @@ function tabDownloads() {
|
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
function tabDocs() {
|
|
516
|
-
const readmePath = path.join(ASSETS, 'README.md');
|
|
516
|
+
const readmePath = path.join(ASSETS, 'CRG-README.md');
|
|
517
517
|
const readmeHtml = fs.existsSync(readmePath) ? mdToHtml(fs.readFileSync(readmePath, 'utf8')) : '<p>No README found.</p>';
|
|
518
518
|
return `<section><div class="st">Documentation</div><div class="rc">${readmeHtml}</div></section>`;
|
|
519
519
|
}
|
|
File without changes
|