@devkitlab/create-nextjs 0.2.10 → 0.2.12

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.
@@ -8,6 +8,7 @@ import { fileURLToPath } from 'node:url';
8
8
  const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = path.dirname(__filename);
10
10
  const templateDir = path.resolve(__dirname, '..', 'template');
11
+ const ignoredNames = new Set(['.DS_Store', '.git', '.github', '.next', 'node_modules', '.env.local']);
11
12
 
12
13
  const rawProjectName = process.argv[2] || 'my-devkitlab-app';
13
14
  const projectName = rawProjectName.trim();
@@ -32,8 +33,9 @@ try {
32
33
  recursive: true,
33
34
  filter: source => {
34
35
  const relativePath = path.relative(templateDir, source);
36
+ const pathParts = relativePath.split(path.sep);
35
37
 
36
- return relativePath !== '.DS_Store';
38
+ return !pathParts.some(part => ignoredNames.has(part));
37
39
  },
38
40
  });
39
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devkitlab/create-nextjs",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "Create a DevkitLab Next.js starter app with TypeScript and Tailwind CSS.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,22 @@
1
+ name: Notify package repo
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ dispatch:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Trigger package publish workflow
14
+ env:
15
+ GH_TOKEN: ${{ secrets.PACKAGE_REPO_DISPATCH_TOKEN }}
16
+ run: |
17
+ curl --fail-with-body -L \
18
+ -X POST \
19
+ -H "Accept: application/vnd.github+json" \
20
+ -H "Authorization: Bearer ${GH_TOKEN}" \
21
+ https://api.github.com/repos/shahadat-robin/devkitlab-nextjs/dispatches \
22
+ -d '{"event_type":"template_updated","client_payload":{"ref":"main"}}'
@@ -46,7 +46,7 @@ Open [http://localhost:3000](http://localhost:3000) into your browser to see the
46
46
  ## Project Structure
47
47
 
48
48
  ```plaintext
49
- NextJS-Starter/
49
+ root/
50
50
  ├── public/ # Static assets
51
51
  │ app/ # Next.js pages
52
52
  │ ├── _layout/ # Layout components
@@ -6,8 +6,6 @@ const HomePage: NextPage = () => (
6
6
  <>
7
7
  <HeroSection />
8
8
  <AnotherSection />
9
- <AnotherSection />
10
- <AnotherSection />
11
9
  </>
12
10
  );
13
11
 
@@ -11,14 +11,9 @@ export default function AppHeader() {
11
11
  return (
12
12
  <header className="py-5 sticky top-0 bg-primary dark:bg-dark-light z-50">
13
13
  <Container className="flex items-center justify-between">
14
- <Image
15
- src="/next.svg"
16
- alt="Brand logo"
17
- width={100}
18
- height={50}
19
- className="h-auto w-[6.25rem] cursor-pointer"
20
- priority
21
- />
14
+ <div className="w-[100px] h-[50px] relative">
15
+ <Image src="/next.svg" alt="Brand logo" fill className="cursor-pointer" priority />
16
+ </div>
22
17
 
23
18
  <label htmlFor="theme-toggle" className="flex items-center cursor-pointer">
24
19
  <div className="relative min-h-[30px] w-[55px] rounded-full bg-white">
@@ -0,0 +1,41 @@
1
+ import { FlatCompat } from '@eslint/eslintrc';
2
+ import js from '@eslint/js';
3
+ import typescriptEslint from '@typescript-eslint/eslint-plugin';
4
+ import nextCoreWebVitals from 'eslint-config-next/core-web-vitals';
5
+ import { defineConfig } from 'eslint/config';
6
+ import path from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+ const compat = new FlatCompat({
12
+ baseDirectory: __dirname,
13
+ recommendedConfig: js.configs.recommended,
14
+ allConfig: js.configs.all,
15
+ });
16
+
17
+ const [nextConfig, nextTypescriptConfig, ...nextCoreWebVitalsRest] = nextCoreWebVitals;
18
+
19
+ export default defineConfig([
20
+ nextConfig,
21
+ ...nextCoreWebVitalsRest,
22
+ {
23
+ extends: [...compat.extends('prettier')],
24
+
25
+ rules: {
26
+ 'no-unused-vars': 'error',
27
+ 'no-console': 'warn',
28
+ 'react/jsx-uses-react': 'warn',
29
+ },
30
+ },
31
+ {
32
+ files: ['**/*.{ts,tsx}'],
33
+ languageOptions: nextTypescriptConfig.languageOptions,
34
+ plugins: {
35
+ '@typescript-eslint': typescriptEslint,
36
+ },
37
+ rules: {
38
+ '@typescript-eslint/no-explicit-any': 'error',
39
+ },
40
+ },
41
+ ]);
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "nextjs-starter-boilerplate",
3
- "version": "0.0.1",
2
+ "name": "devkitlab-nextjs-starter",
3
+ "version": "1.0.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "engines": {
@@ -13,7 +13,7 @@
13
13
  "build": "next build",
14
14
  "start": "next start",
15
15
  "format": "prettier . --write",
16
- "lint": "next lint --max-warnings=0",
16
+ "lint": "eslint --max-warnings=0 .",
17
17
  "prepare": "husky"
18
18
  },
19
19
  "lint-staged": {
@@ -22,20 +22,20 @@
22
22
  "dependencies": {
23
23
  "clsx": "^2.1.1",
24
24
  "lenis": "^1.1.1",
25
- "next": "^15.3.4",
25
+ "next": "16.2.2",
26
26
  "next-themes": "^0.4.4",
27
- "react": "19.0.0",
28
- "react-dom": "19.0.0",
27
+ "react": "19.2.4",
28
+ "react-dom": "19.2.4",
29
29
  "sharp": "^0.33.5",
30
30
  "tailwind-merge": "^2.3.0",
31
31
  "tw-elements-react": "^1.0.0-alpha2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^20",
35
- "@types/react": "19.0.10",
36
- "@types/react-dom": "19.0.4",
37
- "eslint": "^8",
38
- "eslint-config-next": "15.1.7",
35
+ "@types/react": "19.2.14",
36
+ "@types/react-dom": "19.2.3",
37
+ "eslint": "^9",
38
+ "eslint-config-next": "16.2.2",
39
39
  "eslint-config-prettier": "^9.1.0",
40
40
  "husky": "^9.0.11",
41
41
  "lint-staged": "^15.2.2",
@@ -44,7 +44,11 @@
44
44
  "prettier": "3.2.5",
45
45
  "tailwindcss": "^3.4.1",
46
46
  "typescript": "^5",
47
- "typescript-eslint": "^7.8.0"
47
+ "typescript-eslint": "^8.0.0"
48
48
  },
49
- "packageManager": "yarn@1.22.22"
49
+ "packageManager": "yarn@1.22.22",
50
+ "resolutions": {
51
+ "@types/react": "19.2.14",
52
+ "@types/react-dom": "19.2.3"
53
+ }
50
54
  }
@@ -10,14 +10,24 @@
10
10
  "moduleResolution": "bundler",
11
11
  "resolveJsonModule": true,
12
12
  "isolatedModules": true,
13
- "jsx": "preserve",
13
+ "jsx": "react-jsx",
14
14
  "incremental": true,
15
- "plugins": [{ "name": "next" }],
15
+ "plugins": [
16
+ {
17
+ "name": "next"
18
+ }
19
+ ],
16
20
  "paths": {
17
21
  "@/*": ["./src/*"]
18
22
  },
19
23
  "target": "ES2017"
20
24
  },
21
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25
+ "include": [
26
+ "next-env.d.ts",
27
+ "**/*.ts",
28
+ "**/*.tsx",
29
+ ".next/types/**/*.ts",
30
+ ".next/dev/types/**/*.ts"
31
+ ],
22
32
  "exclude": ["node_modules"]
23
33
  }