Skip to content

Commit

Permalink
Rework nwjs builder/runner + Update some dependencies
Browse files Browse the repository at this point in the history
Closes #16, Closes #204
  • Loading branch information
Elanis authored May 7, 2024
1 parent 7a9d4e9 commit f7350a4
Show file tree
Hide file tree
Showing 33 changed files with 24,003 additions and 23,906 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ typings/
# TernJS port file
.tern-port

.idea/
.idea/
benchmark/01-empty-app/nw.js/cache/

benchmark/02-empty-app-frameless/nw.js/cache/
92 changes: 48 additions & 44 deletions README.md

Large diffs are not rendered by default.

421 changes: 224 additions & 197 deletions benchmark/01-empty-app/DotnetMauiVue/vue-project/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions benchmark/01-empty-app/DotnetMauiVue/vue-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
},
"dependencies": {
"pinia": "^2.1.7",
"vue": "^3.4.26",
"vue": "^3.4.27",
"vue-router": "^4.3.2"
},
"devDependencies": {
"@dotnet/jsinterop": "^3.1.31",
"@rushstack/eslint-patch": "^1.10.2",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.12.8",
"@types/node": "^20.12.10",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/test-utils": "^2.4.5",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.1",
"eslint": "^9.2.0",
"eslint": "^8.57.0",
"eslint-plugin-vue": "^9.25.0",
"jsdom": "^24.0.0",
"npm-run-all": "^4.1.5",
Expand Down
14 changes: 7 additions & 7 deletions benchmark/01-empty-app/nodegui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benchmark/01-empty-app/nodegui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@nodegui/packer": "^1.5.0",
"@types/node": "^20.12.8",
"@types/node": "^20.12.10",
"clean-webpack-plugin": "^4.0.0",
"file-loader": "^6.2.0",
"native-addon-loader": "^2.0.1",
Expand Down
8 changes: 4 additions & 4 deletions benchmark/01-empty-app/nodegui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@
resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz"
integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==

"@types/node@*", "@types/node@^20.12.8":
version "20.12.8"
resolved "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz"
integrity sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==
"@types/node@*", "@types/node@^20.12.10":
version "20.12.10"
resolved "https://registry.npmjs.org/@types/node/-/node-20.12.10.tgz"
integrity sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw==
dependencies:
undici-types "~5.26.4"

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
window.addEventListener('load', () => {
console.log('App started and loaded !');
console.log('App started and loaded !');
console.error('App started and loaded !');
process.stdout.write('App started and loaded !');
process.stderr.write('App started and loaded !');
});
7 changes: 7 additions & 0 deletions benchmark/01-empty-app/nw.js/app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "01-empty-app",
"version": "1.0.0",
"main": "index.html",
"node-main": "main.js",
"chromium-args": "--enable-logging=stderr"
}
27 changes: 27 additions & 0 deletions benchmark/01-empty-app/nw.js/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os from 'node:os';
import nwbuild from 'nw-builder';

let archs = [];
if(os.platform() === 'win32') {
archs = ['ia32', 'x64'];
} else if(os.platform() === 'darwin') {
archs = ['x64', 'arm64'];
} else if(os.platform() === 'linux') {
archs = ['ia32', 'x64'];
} else {
throw new Error('Unsupported platform !');
}

for(const arch of archs) {
console.log(`Building for ${arch} ...`);
await nwbuild({
mode: 'build',
version: 'stable',
flavor: 'normal',
outDir: `./dist/01-empty-app-${os.platform()}-${arch}/`,
srcDir: './app',
arch,
glob: false
});
console.log(`Building for ${arch} ... Done!`);
}
Loading

0 comments on commit f7350a4

Please sign in to comment.