create-grist-widget 0.2.2 → 0.2.3

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { existsSync, mkdirSync, readdirSync, cpSync, readFileSync, writeFileSync } from "node:fs"
2
+ import { existsSync, mkdirSync, readdirSync, cpSync, readFileSync, writeFileSync, renameSync } from "node:fs"
3
3
  import path from "node:path"
4
4
  import { fileURLToPath } from "node:url"
5
5
 
@@ -25,6 +25,11 @@ if (existsSync(target) && readdirSync(target).length > 0) {
25
25
  mkdirSync(target, { recursive: true })
26
26
  cpSync(TEMPLATE_DIR, target, { recursive: true })
27
27
 
28
+ // npm strips a literal `.gitignore` from the published package (see
29
+ // build-template.mjs), so it ships as `_gitignore` — restore the real name.
30
+ const gitignorePath = path.join(target, "_gitignore")
31
+ if (existsSync(gitignorePath)) renameSync(gitignorePath, path.join(target, ".gitignore"))
32
+
28
33
  const title = rawName
29
34
  .split("-")
30
35
  .map((w) => w[0].toUpperCase() + w.slice(1))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-grist-widget",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Scaffold a new Grist custom widget from the grist-widget-sdk Vite template",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,24 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ dist
12
+ dist-ssr
13
+ *.local
14
+
15
+ # Editor directories and files
16
+ .vscode/*
17
+ !.vscode/extensions.json
18
+ .idea
19
+ .DS_Store
20
+ *.suo
21
+ *.ntvs*
22
+ *.njsproj
23
+ *.sln
24
+ *.sw?
@@ -42,5 +42,6 @@
42
42
  "typescript": "~5.9.3",
43
43
  "typescript-eslint": "^8.57.1",
44
44
  "vite": "^7.3.1"
45
- }
45
+ },
46
+ "packageManager": "pnpm@11.1.3"
46
47
  }