create-pollar-app-patrickkish 0.1.2 → 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.
@@ -2,6 +2,13 @@ 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";
7
+
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);
11
+ }
5
12
 
6
13
  /**
7
14
  * @param {string} source
@@ -17,6 +24,8 @@ export async function copyTemplate(source, target, vars) {
17
24
  },
18
25
  });
19
26
 
27
+ await writeProjectGitignore(source, target);
28
+
20
29
  const pkgPath = path.join(target, "package.json");
21
30
  const pkgRaw = await readFile(pkgPath, "utf8");
22
31
  await writeFile(
package/lib/create.js CHANGED
@@ -107,7 +107,9 @@ export async function createApp(options) {
107
107
  console.log(`Installing dependencies with ${packageManager}…`);
108
108
  await runCommand(installCommand(packageManager), targetDir);
109
109
 
110
+ // .gitignore must exist before staging so node_modules is never committed.
110
111
  await runCommand("git add -A", targetDir);
112
+ await runCommand("git rm -r --cached -f node_modules", targetDir).catch(() => undefined);
111
113
  await runCommand('git commit -m "Initial commit from create-pollar-app-patrickkish"', targetDir).catch(
112
114
  () => undefined,
113
115
  );
package/package.json CHANGED
@@ -1,20 +1,31 @@
1
1
  {
2
2
  "name": "create-pollar-app-patrickkish",
3
- "version": "0.1.2",
3
+ "version": "0.1.6",
4
4
  "description": "Scaffold a Next.js app with Pollar wallet pre-wired",
5
5
  "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/PatrickKish1/create-pollar-app-patrickkish.git"
9
+ },
10
+ "homepage": "https://github.com/PatrickKish1/create-pollar-app-patrickkish#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/PatrickKish1/create-pollar-app-patrickkish/issues"
13
+ },
6
14
  "type": "module",
7
15
  "engines": {
8
16
  "node": ">=20"
9
17
  },
10
18
  "packageManager": "pnpm@10.28.2",
11
19
  "bin": {
12
- "create-pollar-app-patrickkish": "./bin/index.js"
20
+ "create-pollar-app-patrickkish": "bin/index.js"
13
21
  },
14
22
  "files": [
23
+ "README.md",
24
+ "LICENSE",
15
25
  "bin",
16
26
  "lib",
17
- "template"
27
+ "template",
28
+ "template/gitignore"
18
29
  ],
19
30
  "scripts": {
20
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