create-wenuts-cli 1.0.0 → 2.0.0

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/package.json CHANGED
@@ -1,17 +1,12 @@
1
1
  {
2
2
  "name": "create-wenuts-cli",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "create-wenuts-cli": "dist/index.js"
8
8
  },
9
9
  "type": "module",
10
- "scripts": {
11
- "dev": "tsx src/index.ts",
12
- "build": "tsc",
13
- "watch": "tsc --watch"
14
- },
15
10
  "files": [
16
11
  "dist",
17
12
  "template"
@@ -31,5 +26,10 @@
31
26
  "@types/node": "^20.0.0",
32
27
  "tsx": "^4.0.0",
33
28
  "typescript": "^5.0.0"
29
+ },
30
+ "scripts": {
31
+ "dev": "tsx src/index.ts",
32
+ "build": "tsc",
33
+ "watch": "tsc --watch"
34
34
  }
35
- }
35
+ }
@@ -0,0 +1,36 @@
1
+ ---
2
+ description:
3
+ globs:
4
+ alwaysApply: false
5
+ ---
6
+
7
+ You are a Senior Front-End Developer and an Expert in ReactJS, NextJS, JavaScript, TypeScript, HTML, CSS and modern UI/UX frameworks (e.g., TailwindCSS, Shadcn, Radix). You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, thoughtful answers, and are a genius at reasoning.
8
+
9
+ - Follow the user’s requirements carefully & to the letter.
10
+ - First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
11
+ - Confirm, then write code!
12
+ - Always write correct, best practice, DRY principle (Dont Repeat Yourself), bug free, fully functional and working code also it should be aligned to listed rules down below at Code Implementation Guidelines .
13
+ - Focus on easy and readability code, over being performant.
14
+ - Fully implement all requested functionality.
15
+ - Leave NO todo’s, placeholders or missing pieces.
16
+ - Ensure code is complete! Verify thoroughly finalised.
17
+ - Include all required imports, and ensure proper naming of key components.
18
+ - Be concise Minimize any other prose.
19
+ - If you think there might not be a correct answer, you say so.
20
+ - If you do not know the answer, say so, instead of guessing.
21
+
22
+ ### Coding Environment
23
+ The user asks questions about the following coding languages:
24
+ - ReactJS
25
+ - NextJS
26
+ - TypeScript
27
+ - TailwindCSS
28
+
29
+ ### Code Implementation Guidelines
30
+ Follow these rules when you write code:
31
+ - Use early returns whenever possible to make the code more readable.
32
+ - Always use Tailwind classes for styling HTML elements; avoid using CSS or tags.
33
+ - Use descriptive variable and function/const names. Also, event functions should be named with a “handle” prefix, like “handleClick” for onClick and “handleKeyDown” for onKeyDown.
34
+ - Use consts instead of functions, for example, “const toggle = () =>”. Also, define a type if possible.
35
+ - Use Mantine as the component library
36
+ - Use tailwindcss instead of native styles. If tailwindcss cannot be used, then styles can be considered
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx lint-staged
@@ -0,0 +1,14 @@
1
+ {
2
+ "printWidth": 180,
3
+ "tabWidth": 4,
4
+ "useTabs": false,
5
+ "semi": true,
6
+ "singleQuote": true,
7
+ "arrowParens": "avoid",
8
+ "bracketSpacing": true,
9
+ "htmlWhitespaceSensitivity": "ignore",
10
+ "stylelintIntegration": false,
11
+ "trailingComma": "es5",
12
+ "tslintIntegration": false,
13
+ "plugins": ["prettier-plugin-tailwindcss"]
14
+ }
@@ -0,0 +1,35 @@
1
+
2
+ 
3
+ > wenuts-template-default@0.1.0 build /Users/wenuts/Desktop/create-project-template/create-project-template/packages/cli/template/default
4
+ > next build
5
+
6
+ ▲ Next.js 15.3.6
7
+
8
+   Creating an optimized production build ...
9
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (148kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
10
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (148kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
11
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
12
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
13
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
14
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
15
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (148kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
16
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (148kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
17
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
18
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
19
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
20
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
21
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
22
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
23
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
24
+ <w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (147kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
25
+ ✓ Compiled successfully in 11.0s
26
+ [?25l   Linting and checking validity of types .   Linting and checking validity of types .. ⨯ ESLint: Cannot find package 'eslint-plugin-prettier' imported from /Users/wenuts/Desktop/create-project-template/create-project-template/packages/cli/template/default/eslint.config.mjs
27
+    Linting and checking validity of types ...   Linting and checking validity of types .   Linting and checking validity of types ..   Linting and checking validity of types ...   Linting and checking validity of types .   Linting and checking validity of types ..   Linting and checking validity of types ...   Linting and checking validity of types .Failed to compile.
28
+
29
+ src/app/[local]/(no-layout)/login/page.tsx
30
+ Type error: Type 'IProps' does not satisfy the constraint 'PageProps'.
31
+ Types of property 'searchParams' are incompatible.
32
+ Type '{ redirect: string; }' is missing the following properties from type 'Promise<any>': then, catch, finally, [Symbol.toStringTag]
33
+
34
+ [?25hNext.js build worker exited with code: 1 and signal: null
35
+ [?25l
36
  .
@@ -0,0 +1,38 @@
1
+ ---
2
+ trigger: manual
3
+ ---
4
+
5
+ You are a Senior Front-End Developer and an Expert in ReactJS, NextJS, JavaScript, TypeScript, HTML, CSS and modern UI/UX frameworks (e.g., TailwindCSS, Shadcn, Radix). You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, thoughtful answers, and are a genius at reasoning.
6
+
7
+ - Follow the user’s requirements carefully & to the letter.
8
+ - First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
9
+ - Confirm, then write code!
10
+ - Always write correct, best practice, DRY principle (Dont Repeat Yourself), bug free, fully functional and working code also it should be aligned to listed rules down below at Code Implementation Guidelines .
11
+ - Focus on easy and readability code, over being performant.
12
+ - Fully implement all requested functionality.
13
+ - Leave NO todo’s, placeholders or missing pieces.
14
+ - Ensure code is complete! Verify thoroughly finalised.
15
+ - Include all required imports, and ensure proper naming of key components.
16
+ - Be concise Minimize any other prose.
17
+ - If you think there might not be a correct answer, you say so.
18
+ - If you do not know the answer, say so, instead of guessing.
19
+
20
+ ### Coding Environment
21
+
22
+ The user asks questions about the following coding languages:
23
+
24
+ - ReactJS
25
+ - NextJS
26
+ - TypeScript
27
+ - TailwindCSS
28
+
29
+ ### Code Implementation Guidelines
30
+
31
+ Follow these rules when you write code:
32
+
33
+ - Use early returns whenever possible to make the code more readable.
34
+ - Always use Tailwind classes for styling HTML elements; avoid using CSS or tags.
35
+ - Use descriptive variable and function/const names. Also, event functions should be named with a “handle” prefix, like “handleClick” for onClick and “handleKeyDown” for onKeyDown.
36
+ - Use consts instead of functions, for example, “const toggle = () =>”. Also, define a type if possible.
37
+ - Use Mantine as the component library
38
+ - Use tailwindcss instead of native styles. If tailwindcss cannot be used, then styles can be considered
@@ -1,15 +1,24 @@
1
- export default {
2
- extends: ["next/core-web-vitals", "plugin:prettier/recommended"],
3
- env: {
4
- browser: true,
5
- node: true,
6
- es6: true,
7
- },
8
- rules: {
9
- "prettier/prettier": 2,
10
- "import/no-anonymous-default-export": 0,
11
- "react-hooks/exhaustive-deps": 0,
12
- "react/no-children-prop": 0,
13
- "react/no-unescaped-entities": 0,
14
- },
15
- };
1
+ /**
2
+ * eslint-plugin-prettier: 将 Prettier 的格式化问题作为 ESLint 的规则来报告。
3
+ * eslint-config-prettier: 关闭所有与 Prettier 冲突的 ESLint 格式化规则,
4
+ */
5
+
6
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
7
+ import { FlatCompat } from '@eslint/eslintrc';
8
+
9
+ const compat = new FlatCompat({});
10
+
11
+ const eslintConfig = [
12
+ ...compat.config({
13
+ extends: ['next/core-web-vitals', 'prettier'],
14
+ }),
15
+ {
16
+ rules: {
17
+ 'react-hooks/exhaustive-deps': 'off',
18
+ 'import/no-anonymous-default-export': 'off',
19
+ },
20
+ },
21
+ eslintPluginPrettierRecommended,
22
+ ];
23
+
24
+ export default eslintConfig;
@@ -1,10 +1,39 @@
1
- import type { NextConfig } from "next";
2
- import createNextIntlPlugin from "next-intl/plugin";
1
+ import type { NextConfig } from 'next';
2
+ import createNextIntlPlugin from 'next-intl/plugin';
3
3
 
4
4
  const withNextIntl = createNextIntlPlugin();
5
5
 
6
6
  const nextConfig: NextConfig = {
7
- /* config options here */
7
+ /* config options here */
8
+ reactStrictMode: false,
9
+ output: 'standalone',
10
+ compress: true,
11
+ trailingSlash: true,
12
+ devIndicators: false,
13
+ compiler: {
14
+ removeConsole: {
15
+ exclude: process.env.NEXT_PUBLIC_NODE_ENV === 'dev' ? ['log', 'warn', 'error'] : ['warn', 'error'],
16
+ },
17
+ },
18
+ eslint: {
19
+ ignoreDuringBuilds: true,
20
+ },
21
+ experimental: {
22
+ optimizePackageImports: ['@mantine/core', '@mantine/hooks', '@mantine/carousel'],
23
+ },
24
+ async headers() {
25
+ return [
26
+ {
27
+ source: '/.well-known/apple-app-site-association',
28
+ headers: [
29
+ {
30
+ key: 'Content-Type',
31
+ value: 'application/json',
32
+ },
33
+ ],
34
+ },
35
+ ];
36
+ },
8
37
  };
9
38
 
10
39
  export default withNextIntl(nextConfig);
@@ -6,20 +6,21 @@
6
6
  "dev": "next dev",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
- "lint": "next lint"
9
+ "lint": "next lint",
10
+ "prepare": "husky"
10
11
  },
11
12
  "dependencies": {
12
13
  "@mantine/core": "^8.1.2",
13
14
  "@mantine/hooks": "^8.1.2",
14
15
  "@types/js-cookie": "^3.0.6",
15
16
  "js-cookie": "^3.0.5",
16
- "next": "15.3.5",
17
+ "next": "15.3.8",
17
18
  "next-auth": "^4.24.11",
18
19
  "next-extra": "^0.6.2",
19
20
  "next-intl": "^4.3.4",
20
21
  "query-string": "^9.2.2",
21
- "react": "^19.0.0",
22
- "react-dom": "^19.0.0",
22
+ "react": "^19.0.1",
23
+ "react-dom": "^19.0.1",
23
24
  "sonner": "^2.0.6",
24
25
  "zustand": "^5.0.6"
25
26
  },
@@ -31,10 +32,23 @@
31
32
  "@types/react-dom": "^19",
32
33
  "eslint": "^9",
33
34
  "eslint-config-next": "15.3.5",
35
+ "husky": "^9.0.11",
36
+ "lint-staged": "^15.2.0",
34
37
  "postcss": "^8.5.6",
35
38
  "postcss-preset-mantine": "^1.18.0",
36
39
  "postcss-simple-vars": "^7.0.1",
40
+ "prettier": "^3.7.4",
41
+ "prettier-eslint": "^16.4.2",
37
42
  "tailwindcss": "^4",
38
43
  "typescript": "^5"
44
+ },
45
+ "lint-staged": {
46
+ "*.{js,jsx,ts,tsx}": [
47
+ "eslint --max-warnings=0",
48
+ "prettier --write"
49
+ ],
50
+ "*.{json,css,scss,md}": [
51
+ "prettier --write"
52
+ ]
39
53
  }
40
- }
54
+ }