Skip to content

Commit

Permalink
Merge branch 'release/v8'
Browse files Browse the repository at this point in the history
  • Loading branch information
saltyshiomix committed Apr 14, 2024
2 parents e25d6cb + 798dfff commit 651967d
Show file tree
Hide file tree
Showing 18 changed files with 1,177 additions and 1,062 deletions.
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,33 @@ Run `npm run build`, and nextron outputs packaged bundles under the `dist` folde
}
```

## Basic Directory Structures

```
.
├── main
│   ├── background.ts
│   └── preload.ts
├── renderer
│   ├── next.config.js
│   ├── pages
│   │   ├── home.tsx
│   │   └── next.tsx
│   ├── preload.d.ts
│   ├── public
│   │   └── images
│   │   └── logo.png
│   └── tsconfig.json
├── resources
│   ├── icon.icns
│   └── icon.ico
├── nextron.config.js
├── electron-builder.yml
├── package.json
├── tsconfig.json
└── README.md
```

## `nextron` or `nextron dev` Options

### `--renderer-port` (default: `8888`)
Expand Down Expand Up @@ -242,8 +269,6 @@ We can extends the default babel config of main process by putting `.babelrc` in

## Examples

See [examples](./examples) folder for more information.

### [examples/basic-lang-javascript](./examples/basic-lang-javascript)

<p align="center"><img src="https://i.imgur.com/X7dSE68.png"></p>
Expand Down Expand Up @@ -433,6 +458,21 @@ $ yarn create nextron-app my-app --example with-material-ui
$ pnpm dlx create-nextron-app my-app --example with-material-ui
```

### [examples/with-next-i18next](./examples/with-next-i18next)

<p align="center"><img src="https://i.imgur.com/uhXCr6v.png"></p>

```
# with npx
$ npx create-nextron-app my-app --example with-next-i18next
# with yarn
$ yarn create nextron-app my-app --example with-next-i18next
# with pnpm
$ pnpm dlx create-nextron-app my-app --example with-next-i18next
```

### [examples/with-tailwindcss](./examples/with-tailwindcss)

<p align="center"><img src="https://i.imgur.com/a9QWW0v.png"></p>
Expand Down
8 changes: 4 additions & 4 deletions examples/basic-lang-javascript-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
8 changes: 4 additions & 4 deletions examples/basic-lang-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
10 changes: 5 additions & 5 deletions examples/basic-lang-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
10 changes: 5 additions & 5 deletions examples/basic-launch-app-from-url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
10 changes: 5 additions & 5 deletions examples/basic-store-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
10 changes: 5 additions & 5 deletions examples/custom-build-options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
10 changes: 5 additions & 5 deletions examples/custom-renderer-port/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
14 changes: 7 additions & 7 deletions examples/with-ant-design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@ant-design/icons": "^4.7.0",
"@ant-design/icons": "^5.3.6",
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"antd": "^4.22.8",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"antd": "^5.16.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
2 changes: 1 addition & 1 deletion examples/with-ant-design/renderer/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import Head from 'next/head'
import type { AppProps } from 'next/app'

import 'antd/dist/antd.css'
import 'antd/dist/reset.css'

function MyApp({ Component, pageProps }: AppProps) {
return (
Expand Down
20 changes: 10 additions & 10 deletions examples/with-chakra-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/react": "^2.8.1",
"@chakra-ui/theme-tools": "^2.1.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@chakra-ui/react": "^2.8.2",
"@chakra-ui/theme-tools": "^2.1.2",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"framer-motion": "^6.5.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"framer-motion": "^11.0.28",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
10 changes: 5 additions & 5 deletions examples/with-emotion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@emotion/babel-plugin": "^11.11.0",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
10 changes: 5 additions & 5 deletions examples/with-material-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"@emotion/cache": "^11.11.0",
Expand All @@ -24,12 +24,12 @@
"@mui/material-nextjs": "^5.15.11",
"@types/node": "^20.11.16",
"@types/react": "^18.2.52",
"electron": "^28.2.1",
"electron-builder": "^24.9.1",
"electron": "^29.3.0",
"electron-builder": "^24.13.3",
"next": "^13.5.6",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
}
}
8 changes: 4 additions & 4 deletions examples/with-next-i18next/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<p align="center"><img src="https://i.imgur.com/X7dSE68.png"></p>
<p align="center"><img src="https://i.imgur.com/uhXCr6v.png"></p>

## Usage

### Create an App

```
# with npx
$ npx create-nextron-app my-app --example basic-lang-javascript
$ npx create-nextron-app my-app --example with-next-i18next
# with yarn
$ yarn create nextron-app my-app --example basic-lang-javascript
$ yarn create nextron-app my-app --example with-next-i18next
# with pnpm
$ pnpm dlx create-nextron-app my-app --example basic-lang-javascript
$ pnpm dlx create-nextron-app my-app --example with-next-i18next
```

### Install Dependencies
Expand Down
6 changes: 3 additions & 3 deletions examples/with-next-i18next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
},
"dependencies": {
"electron-serve": "^1.3.0",
"electron-store": "^8.1.0"
"electron-store": "^8.2.0"
},
"devDependencies": {
"electron": "29.0.0-beta.4",
"electron-builder": "^24.9.1",
"electron-builder": "^24.13.3",
"i18next": "^23.11.1",
"next": "^13.5.6",
"next-i18next": "^15.2.0",
"nextron": "^8.14.0",
"nextron": "^8.15.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^14.1.0"
Expand Down
Loading

0 comments on commit 651967d

Please sign in to comment.