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.
- package/bin/create-grist-widget.mjs +6 -1
- package/package.json +1 -1
- package/template/_gitignore +24 -0
- package/template/package.json +2 -1
|
@@ -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
|
@@ -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?
|