create-pollar-app-patrickkish 0.1.4 → 0.1.6
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/lib/copy-template.js +7 -10
- package/package.json +4 -3
- package/template/gitignore +32 -0
package/lib/copy-template.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cp, readFile, writeFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
4
|
const SKIP = new Set(["node_modules", ".next", ".git"]);
|
|
5
|
+
// npm always strips `.gitignore` from published tarballs — ship as `gitignore` instead.
|
|
6
|
+
const GITIGNORE_TEMPLATE = "gitignore";
|
|
5
7
|
|
|
6
|
-
async function
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
try {
|
|
10
|
-
await access(gitignoreDst);
|
|
11
|
-
} catch {
|
|
12
|
-
await copyFile(gitignoreSrc, gitignoreDst);
|
|
13
|
-
}
|
|
8
|
+
async function writeProjectGitignore(source, target) {
|
|
9
|
+
const content = await readFile(path.join(source, GITIGNORE_TEMPLATE), "utf8");
|
|
10
|
+
await writeFile(path.join(target, ".gitignore"), content);
|
|
14
11
|
}
|
|
15
12
|
|
|
16
13
|
/**
|
|
@@ -27,7 +24,7 @@ export async function copyTemplate(source, target, vars) {
|
|
|
27
24
|
},
|
|
28
25
|
});
|
|
29
26
|
|
|
30
|
-
await
|
|
27
|
+
await writeProjectGitignore(source, target);
|
|
31
28
|
|
|
32
29
|
const pkgPath = path.join(target, "package.json");
|
|
33
30
|
const pkgRaw = await readFile(pkgPath, "utf8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pollar-app-patrickkish",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Scaffold a Next.js app with Pollar wallet pre-wired",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,14 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"packageManager": "pnpm@10.28.2",
|
|
19
19
|
"bin": {
|
|
20
|
-
"create-pollar-app-patrickkish": "
|
|
20
|
+
"create-pollar-app-patrickkish": "bin/index.js"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"README.md",
|
|
24
24
|
"LICENSE",
|
|
25
25
|
"bin",
|
|
26
26
|
"lib",
|
|
27
|
-
"template"
|
|
27
|
+
"template",
|
|
28
|
+
"template/gitignore"
|
|
28
29
|
],
|
|
29
30
|
"scripts": {
|
|
30
31
|
"prepublishOnly": "node scripts/prepublish-check.js",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
/node_modules
|
|
4
|
+
/.pnp
|
|
5
|
+
.pnp.*
|
|
6
|
+
.yarn/*
|
|
7
|
+
!.yarn/patches
|
|
8
|
+
!.yarn/plugins
|
|
9
|
+
!.yarn/releases
|
|
10
|
+
!.yarn/versions
|
|
11
|
+
|
|
12
|
+
# next.js
|
|
13
|
+
/.next/
|
|
14
|
+
/out/
|
|
15
|
+
|
|
16
|
+
# env
|
|
17
|
+
.env
|
|
18
|
+
.env*.local
|
|
19
|
+
|
|
20
|
+
# misc
|
|
21
|
+
.DS_Store
|
|
22
|
+
*.pem
|
|
23
|
+
npm-debug.log*
|
|
24
|
+
yarn-debug.log*
|
|
25
|
+
yarn-error.log*
|
|
26
|
+
.pnpm-debug.log*
|
|
27
|
+
|
|
28
|
+
# typescript
|
|
29
|
+
next-env.d.ts
|
|
30
|
+
|
|
31
|
+
# vercel
|
|
32
|
+
.vercel
|