create-web-kit 25.1117.1059 → 26.121.1747

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.
@@ -32,8 +32,8 @@ export const FRAMEWORKS = [
32
32
  workingDir: "target",
33
33
  },
34
34
  {
35
- command: "pnpm add date-fns next-themes motion",
36
- description: "Installing date-fns for date utilities",
35
+ command: "pnpm add date-fns next-themes motion dotenv",
36
+ description: "Installing runtime utilities",
37
37
  workingDir: "target",
38
38
  },
39
39
  {
@@ -11,6 +11,7 @@ const TEMPLATE_FILES = [
11
11
  { source: ".env.test", destination: ".env.test" },
12
12
  { source: ".env.development", destination: ".env.development" },
13
13
  { source: ".env.production", destination: ".env.production" },
14
+ { source: ".env.stage", destination: ".env.stage" },
14
15
  { source: ".husky/pre-commit", destination: ".husky/pre-commit" },
15
16
  { source: ".husky/_/husky.sh", destination: ".husky/_/husky.sh" },
16
17
  // DevContainer
@@ -64,6 +65,10 @@ function copyConfigHuskyPackage(root) {
64
65
  pkg.scripts = {};
65
66
  }
66
67
  pkg.scripts.prepare = "husky";
68
+ if (!pkg.scripts["build:stage"]) {
69
+ pkg.scripts["build:stage"] =
70
+ "NODE_ENV=production dotenv -e .env.stage next build";
71
+ }
67
72
  // 添加 lint-staged 配置
68
73
  pkg["lint-staged"] = {
69
74
  "**/*.{js,jsx,ts,tsx,json,css,scss,md}": ["prettier --write"],
@@ -0,0 +1,2 @@
1
+ NEXT_PUBLIC_API_URL=/api
2
+ NEXT_PUBLIC_BASE_URL=/
@@ -1,13 +1,16 @@
1
- import { ThemeProvider } from "./theme";
2
- import { QueryProvider } from "./query";
3
- import { Toaster } from "sonner";
1
+ import BuildInfo from "@/components/build-info";
4
2
  import { TooltipProvider } from "@/components/ui/tooltip";
3
+ import { Toaster } from "sonner";
4
+
5
+ import { QueryProvider } from "./query";
6
+ import { ThemeProvider } from "./theme";
5
7
 
6
8
  export function Providers({ children }: React.PropsWithChildren) {
7
9
  return (
8
10
  <QueryProvider>
9
11
  <ThemeProvider>
10
12
  <TooltipProvider>{children}</TooltipProvider>
13
+ <BuildInfo />
11
14
  <Toaster position="top-right" richColors />
12
15
  </ThemeProvider>
13
16
  </QueryProvider>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-web-kit",
3
- "version": "25.1117.1059",
3
+ "version": "26.0121.1747",
4
4
  "description": "A powerful scaffolding tool for creating modern frontend projects with Vue, Next.js, and Electron templates",
5
5
  "type": "module",
6
6
  "bin": {