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 Sep 5, 2023
2 parents 3c6980d + 80b905a commit fdc2a3a
Show file tree
Hide file tree
Showing 16 changed files with 1,216 additions and 806 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.13.0
18.17.1
2 changes: 1 addition & 1 deletion examples/basic-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/basic-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-build-options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-main-entry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-renderer-port/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/ipc-communication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/store-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-ant-design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-emotion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-material-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"electron": "^21.3.3",
"electron-builder": "^23.6.0",
"next": "^12.3.4",
"nextron": "^8.5.0",
"nextron": "^8.6.0",
"postcss": "^8.4.13",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
8 changes: 4 additions & 4 deletions lib/nextron-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ if (args['--help']) {
process.exit(0);
}

const nextronConfig = getNextronConfig()

const rendererPort = args['--port'] || 8888;
const remoteDebuggingPort = args['--remote-debugging-port'] || 5858;
const inspectPort = args['--inspect'] || 9292;
const startupDelay = getNextronConfig().startupDelay || args['--startup-delay'] || 0;
const startupDelay = nextronConfig.startupDelay || args['--startup-delay'] || 0;

const execaOptions: execa.Options = {
cwd: process.cwd(),
stdio: 'inherit',
};

async function dev() {
const { rendererSrcDir } = getNextronConfig();

let firstCompile = true;
let watching: any;
let mainProcess: ChildProcess;
Expand All @@ -83,7 +83,7 @@ async function dev() {
const startRendererProcess = () => {
const child = execa(
'next',
['-p', rendererPort, rendererSrcDir || 'renderer'],
['-p', rendererPort, nextronConfig.rendererSrcDir || 'renderer'],
execaOptions,
);
child.on('close', () => {
Expand Down
4 changes: 2 additions & 2 deletions lib/webpack/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { merge } from 'webpack-merge';
import configure from './webpack.config';

const cwd = process.cwd();
const { main: background } = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), { encoding: 'utf8' }));
const ext = fs.existsSync(path.join(cwd, 'tsconfig.json')) ? '.ts' : '.js';

export const getNextronConfig = () => {
const nextronConfigPath = path.join(cwd, 'nextron.config.js');
Expand All @@ -19,7 +19,7 @@ export const getWebpackConfig = (env: 'development' | 'production') => {
const { mainSrcDir, webpack } = getNextronConfig();
const userConfig = merge(configure(env), {
entry: {
background: path.join(cwd, background),
background: path.join(cwd, mainSrcDir || 'main', `background${ext}`),
},
output: {
filename: '[name].js',
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextron",
"version": "8.5.0",
"version": "8.6.0",
"description": "⚡ NEXT.js + Electron ⚡",
"repository": "[email protected]:saltyshiomix/nextron.git",
"author": "Shiono Yoshihide <[email protected]>",
Expand Down Expand Up @@ -35,33 +35,33 @@
"prepublishOnly": "NODE_ENV=production npm run build"
},
"dependencies": {
"@babel/core": "7.20.12",
"@babel/core": "7.22.15",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/plugin-proposal-optional-chaining": "7.20.7",
"@babel/plugin-transform-runtime": "7.19.6",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "7.18.6",
"@babel/runtime": "7.20.13",
"@babel/runtime-corejs3": "7.20.13",
"@babel/plugin-transform-optional-chaining": "7.22.15",
"@babel/plugin-transform-runtime": "7.22.15",
"@babel/preset-env": "7.22.15",
"@babel/preset-typescript": "7.22.15",
"@babel/runtime": "7.22.15",
"@babel/runtime-corejs3": "7.22.15",
"arg": "5.0.2",
"babel-loader": "9.1.2",
"babel-loader": "9.1.3",
"chalk": "4.1.2",
"execa": "5.1.1",
"fs-extra": "11.1.0",
"webpack": "5.80.0",
"webpack-merge": "5.8.0"
"webpack": "5.88.2",
"webpack-merge": "5.9.0"
},
"devDependencies": {
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.3.0",
"@types/fs-extra": "^9.0.13",
"@types/node": "^18.11.18",
"rimraf": "^3.0.2",
"rollup": "^3.10.1",
"@rollup/plugin-commonjs": "^25.0.4",
"@rollup/plugin-node-resolve": "^15.2.1",
"@rollup/plugin-terser": "^0.4.3",
"@types/fs-extra": "^11.0.1",
"@types/node": "^20.5.9",
"rimraf": "^5.0.1",
"rollup": "^3.28.1",
"rollup-plugin-auto-external": "^2.0.0",
"typescript": "^4.9.4"
"typescript": "^5.2.2"
}
}
Loading

0 comments on commit fdc2a3a

Please sign in to comment.