stego-cli 0.1.1 → 0.1.2

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/dist/stego-cli.js +15 -1
  2. package/package.json +1 -1
package/dist/stego-cli.js CHANGED
@@ -16,6 +16,15 @@ const STATUS_RANK = {
16
16
  };
17
17
  const RESERVED_COMMENT_PREFIX = "CMT";
18
18
  const ROOT_CONFIG_FILENAME = "stego.config.json";
19
+ const SCAFFOLD_GITIGNORE_CONTENT = `node_modules/
20
+ /dist/
21
+ .DS_Store
22
+ *.log
23
+ projects/*/dist/*
24
+ !projects/*/dist/.gitkeep
25
+ projects/*/.vscode/settings.json
26
+ .vscode/settings.json
27
+ `;
19
28
  const PROJECT_EXTENSION_RECOMMENDATIONS = [
20
29
  "matt-gold.stego-extension",
21
30
  "matt-gold.saurus-extension"
@@ -388,7 +397,7 @@ function initWorkspace(options) {
388
397
  throw new Error(`Target directory is not empty: ${targetRoot}. Re-run with --force to continue.`);
389
398
  }
390
399
  const copiedPaths = [];
391
- copyTemplateAsset(".gitignore", targetRoot, copiedPaths);
400
+ writeScaffoldGitignore(targetRoot, copiedPaths);
392
401
  copyTemplateAsset(".markdownlint.json", targetRoot, copiedPaths);
393
402
  copyTemplateAsset(".cspell.json", targetRoot, copiedPaths);
394
403
  copyTemplateAsset(ROOT_CONFIG_FILENAME, targetRoot, copiedPaths);
@@ -433,6 +442,11 @@ function copyTemplateAsset(sourceRelativePath, targetRoot, copiedPaths, options)
433
442
  }
434
443
  copiedPaths.push(sourceRelativePath);
435
444
  }
445
+ function writeScaffoldGitignore(targetRoot, copiedPaths) {
446
+ const destinationPath = path.join(targetRoot, ".gitignore");
447
+ fs.writeFileSync(destinationPath, SCAFFOLD_GITIGNORE_CONTENT, "utf8");
448
+ copiedPaths.push(".gitignore");
449
+ }
436
450
  function shouldCopyTemplatePath(currentSourcePath) {
437
451
  const relativePath = path.relative(packageRoot, currentSourcePath);
438
452
  if (!relativePath || relativePath.startsWith("..")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stego-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Installable CLI for the Stego writing monorepo workflow.",
6
6
  "bin": {