@devkitlab/create-nextjs 0.2.9 → 0.2.11
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/README.md +0 -5
- package/bin/create-nextjs.mjs +3 -1
- package/package.json +1 -1
- package/template/.github/workflows/notify-package-repo.yml +22 -0
- package/template/app/(home)/page.tsx +0 -2
- package/template/app/_layout/header.tsx +3 -8
- package/template/eslint.config.mjs +41 -0
- package/template/package.json +15 -11
- package/template/tsconfig.json +13 -3
- package/template/yarn.lock +1028 -574
package/README.md
CHANGED
|
@@ -62,8 +62,3 @@ This starter is useful if you want:
|
|
|
62
62
|
- Tailwind configured out of the box
|
|
63
63
|
- a starter that can grow into a CMS-backed app
|
|
64
64
|
- a reusable foundation for client projects or internal tools
|
|
65
|
-
|
|
66
|
-
## Package
|
|
67
|
-
|
|
68
|
-
- npm: `@devkitlab/create-nextjs`
|
|
69
|
-
- repository: `shahadat-robin/devkitlab-nextjs`
|
package/bin/create-nextjs.mjs
CHANGED
|
@@ -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
|
|
38
|
+
return !pathParts.some(part => ignoredNames.has(part));
|
|
37
39
|
},
|
|
38
40
|
});
|
|
39
41
|
|
package/package.json
CHANGED
|
@@ -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"}}'
|
|
@@ -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
|
-
<
|
|
15
|
-
src="/next.svg"
|
|
16
|
-
|
|
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
|
+
]);
|
package/template/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "nextjs-starter
|
|
3
|
-
"version": "0.0
|
|
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": "
|
|
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": "
|
|
25
|
+
"next": "16.2.2",
|
|
26
26
|
"next-themes": "^0.4.4",
|
|
27
|
-
"react": "19.
|
|
28
|
-
"react-dom": "19.
|
|
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.
|
|
36
|
-
"@types/react-dom": "19.
|
|
37
|
-
"eslint": "^
|
|
38
|
-
"eslint-config-next": "
|
|
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",
|
|
@@ -46,5 +46,9 @@
|
|
|
46
46
|
"typescript": "^5",
|
|
47
47
|
"typescript-eslint": "^7.8.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
|
}
|
package/template/tsconfig.json
CHANGED
|
@@ -10,14 +10,24 @@
|
|
|
10
10
|
"moduleResolution": "bundler",
|
|
11
11
|
"resolveJsonModule": true,
|
|
12
12
|
"isolatedModules": true,
|
|
13
|
-
"jsx": "
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
14
|
"incremental": true,
|
|
15
|
-
"plugins": [
|
|
15
|
+
"plugins": [
|
|
16
|
+
{
|
|
17
|
+
"name": "next"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
16
20
|
"paths": {
|
|
17
21
|
"@/*": ["./src/*"]
|
|
18
22
|
},
|
|
19
23
|
"target": "ES2017"
|
|
20
24
|
},
|
|
21
|
-
"include": [
|
|
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
|
}
|