create-landing-app 0.2.1 → 0.2.4

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 {
package/dist/prompts.js CHANGED
@@ -10,40 +10,13 @@ export async function runPrompts() {
10
10
  const packageManager = await select({
11
11
  message: "Package manager?",
12
12
  options: [
13
- { value: "bun", label: "bun" },
14
13
  { value: "pnpm", label: "pnpm" },
14
+ { value: "bun", label: "bun" },
15
15
  { value: "yarn", label: "yarn" },
16
16
  ],
17
17
  });
18
18
  if (isCancel(packageManager))
19
19
  return null;
20
- const i18n = await select({
21
- message: "i18n / Translation?",
22
- options: [
23
- { value: "none", label: "None" },
24
- { value: "dict", label: "Dictionary-based (no extra deps)" },
25
- ],
26
- });
27
- if (isCancel(i18n))
28
- return null;
29
- const stateManagement = await select({
30
- message: "State management?",
31
- options: [
32
- { value: "none", label: "None (recommended for simple sites)" },
33
- { value: "zustand", label: "Zustand" },
34
- ],
35
- });
36
- if (isCancel(stateManagement))
37
- return null;
38
- const dataFetching = await select({
39
- message: "Data fetching?",
40
- options: [
41
- { value: "none", label: "None" },
42
- { value: "tanstack-query", label: "TanStack Query" },
43
- ],
44
- });
45
- if (isCancel(dataFetching))
46
- return null;
47
20
  const blog = await confirm({ message: "Include Blog section?" });
48
21
  if (isCancel(blog))
49
22
  return null;
@@ -53,9 +26,9 @@ export async function runPrompts() {
53
26
  return {
54
27
  projectName: String(projectName).trim(),
55
28
  packageManager: packageManager,
56
- i18n: i18n,
57
- stateManagement: stateManagement,
58
- dataFetching: dataFetching,
29
+ i18n: "dict",
30
+ stateManagement: "zustand",
31
+ dataFetching: "tanstack-query",
59
32
  blog: Boolean(blog),
60
33
  docker: Boolean(docker),
61
34
  };
@@ -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.4",
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/_
@@ -18,6 +18,8 @@ const eslintConfig = [
18
18
  "@typescript-eslint/no-explicit-any": "warn",
19
19
  // React hooks rules
20
20
  "react-hooks/exhaustive-deps": "warn",
21
+ // Allow raw <img> elements — Next.js Image optimization is opt-in
22
+ "@next/next/no-img-element": "off",
21
23
  },
22
24
  },
23
25
  ];