Skip to content

Commit

Permalink
added CLI hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
KenCorma committed Oct 22, 2024
1 parent 8661c19 commit bd26734
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"publish": "yarn run vite:compile && todesktop build --async && todesktop release",
"sign": "node debug/sign.js",
"start": "node ./scripts/launchdev.js",
"typescript": "yarn run tsc"
"typescript": "yarn run tsc",
"todesktop:beforeInstall" : "./scripts/todesktop/beforeInstall.js",
"todesktop:afterPack": "./scripts/todesktop/afterPack.js"
},
"devDependencies": {
"@electron/fuses": "^1.8.0",
Expand Down
12 changes: 12 additions & 0 deletions scripts/todesktop/afterPack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

module.exports = async ({ appOutDir, packager }) => {
/**
* appPkgName - string - the name of the app package
* appId - string - the app id
* shouldCodeSign - boolean - whether the app will be code signed or not
* outDir - string - the path to the output directory
* appOutDir - string - the path to the app output directory
* packager - object - the packager object
* arch - number - the architecture of the app. ia32 = 0, x64 = 1, armv7l = 2, arm64 = 3, universal = 4.
*/
}
9 changes: 9 additions & 0 deletions scripts/todesktop/beforeInstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

module.exports = async ({ pkgJsonPath, pkgJson, appDir, hookName }) => {
/**
* pkgJsonPath - string - path to the package.json file
* pkgJson - object - the parsed package.json file
* appDir - string - the path to the app directory
* hookName - string - the name of the hook ("todesktop:beforeInstall" or "todesktop:afterPack")
*/
};

0 comments on commit bd26734

Please sign in to comment.