Skip to content

Commit cbe1200

Browse files
authored
feat(cli/templates) add next and next-ts (#137)
* [FEATURE] Next and NextTs template * [BUGFIX] Style on hover and Prettier * [REFACTO] Color on Dark mode * [BUFIX] Prettier * [REFACTO] Style for Next Image * feat(cli/templates) add next and next-ts
1 parent e850cef commit cbe1200

33 files changed

Lines changed: 631 additions & 2 deletions

.changes/nextjs.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-tauri-app": patch
3+
---
4+
5+
Add `next` and `next-ts` template

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Currently supported template presets include:
8181
- `solid`
8282
- `solid-ts`
8383
- `yew`
84+
- `next`
85+
- `next-ts`
8486

8587
You can use `.` for the project name to scaffold in the current directory.
8688

packages/cli/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Currently supported template presets include:
3636
- `solid`
3737
- `solid-ts`
3838
- `yew`
39+
- `next`
40+
- `next-ts`
3941

4042
You can use `.` for the project name to scaffold in the current directory.
4143

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Tauri + Next.js + Typescript
2+
3+
This template should help get you started developing with Tauri, Next.js and Typescript.
4+
5+
## Recommended IDE Setup
6+
7+
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
.next
15+
16+
# Editor directories and files
17+
.vscode/*
18+
!.vscode/extensions.json
19+
.idea
20+
.DS_Store
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
*.sw?
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/** @type {import('next').NextConfig} */
2+
3+
const nextConfig = {
4+
reactStrictMode: true,
5+
swcMinify: true,
6+
experimental: {
7+
images: {
8+
unoptimized: true,
9+
},
10+
},
11+
};
12+
13+
module.exports = nextConfig;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "{{package_name}}",
3+
"private": true,
4+
"version": "0.0.0",
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build && next export -o dist",
8+
"tauri": "tauri"
9+
},
10+
"dependencies": {
11+
"@tauri-apps/api": "^1.0.2",
12+
"next": "^12.2.5",
13+
"react": "^18.2.0",
14+
"react-dom": "^18.2.0"
15+
},
16+
"devDependencies": {
17+
"@tauri-apps/cli": "^1.0.5",
18+
"@types/node": "^18.7.11",
19+
"@types/react": "^18.0.17",
20+
"@types/react-dom": "^18.0.6",
21+
"typescript": "^4.7.4"
22+
}
23+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"$schema": "..\\node_modules/@tauri-apps/cli\\schema.json",
3+
"build": {
4+
"beforeBuildCommand": "{{pkg_manager_run_command}} build",
5+
"beforeDevCommand": "{{pkg_manager_run_command}} dev",
6+
"devPath": "http://localhost:3000",
7+
"distDir": "../dist"
8+
},
9+
"package": {
10+
"productName": "{{package_name}}",
11+
"version": "0.0.0"
12+
},
13+
"tauri": {
14+
"allowlist": {
15+
"all": true
16+
},
17+
"bundle": {
18+
"active": true,
19+
"category": "DeveloperTool",
20+
"copyright": "",
21+
"deb": {
22+
"depends": []
23+
},
24+
"externalBin": [],
25+
"icon": [
26+
"icons/32x32.png",
27+
"icons/128x128.png",
28+
"icons/128x128@2x.png",
29+
"icons/icon.icns",
30+
"icons/icon.ico"
31+
],
32+
"identifier": "com.tauri.dev",
33+
"longDescription": "",
34+
"macOS": {
35+
"entitlements": null,
36+
"exceptionDomain": "",
37+
"frameworks": [],
38+
"providerShortName": null,
39+
"signingIdentity": null
40+
},
41+
"resources": [],
42+
"shortDescription": "",
43+
"targets": "all",
44+
"windows": {
45+
"certificateThumbprint": null,
46+
"digestAlgorithm": "sha256",
47+
"timestampUrl": ""
48+
}
49+
},
50+
"security": {
51+
"csp": null
52+
},
53+
"updater": {
54+
"active": false
55+
},
56+
"windows": [
57+
{
58+
"fullscreen": false,
59+
"height": 600,
60+
"resizable": true,
61+
"title": "{{package_name}}",
62+
"width": 800
63+
}
64+
]
65+
}
66+
}

0 commit comments

Comments
 (0)