create-landing-app 0.2.1 → 0.2.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.
package/dist/install.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { execa } from "execa";
2
2
  import { spinner } from "@clack/prompts";
3
3
  export async function install(pm, cwd) {
4
+ // git init is required before install so husky's prepare script can set up hooks
5
+ await execa("git", ["init"], { cwd });
4
6
  const s = spinner();
5
7
  s.start(`Installing dependencies with ${pm}...`);
6
8
  try {
@@ -14,8 +14,11 @@ export async function copyDir(src, dest, overwrite = false) {
14
14
  await copyDir(srcPath, destPath, overwrite);
15
15
  }
16
16
  else {
17
- if (overwrite || !fs.existsSync(destPath)) {
18
- fs.copyFileSync(srcPath, destPath);
17
+ // npm strips .gitignore from published packages; store as _gitignore and restore on copy
18
+ const destName = entry.name === "_gitignore" ? ".gitignore" : entry.name;
19
+ const destFile = path.join(dest, destName);
20
+ if (overwrite || !fs.existsSync(destFile)) {
21
+ fs.copyFileSync(srcPath, destFile);
19
22
  }
20
23
  }
21
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-landing-app",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Create a production-ready Next.js landing page with one command",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,44 @@
1
+ # dependencies
2
+ node_modules/
3
+ /.pnp
4
+ .pnp.js
5
+
6
+ # testing
7
+ /coverage
8
+
9
+ # next.js
10
+ /.next/
11
+ /out/
12
+
13
+ # production
14
+ /build
15
+
16
+ # misc
17
+ .DS_Store
18
+ *.pem
19
+
20
+ # debug
21
+ npm-debug.log*
22
+ yarn-debug.log*
23
+ yarn-error.log*
24
+
25
+ # env files
26
+ .env
27
+ .env*.local
28
+ .env.local
29
+ .env.development.local
30
+ .env.test.local
31
+ .env.production.local
32
+
33
+ # vercel
34
+ .vercel
35
+
36
+ # typescript
37
+ *.tsbuildinfo
38
+ next-env.d.ts
39
+
40
+ # turbo
41
+ .turbo
42
+
43
+ # husky
44
+ .husky/_