File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,28 @@ You can use this hook to generate any static files or resources your app require
3232
3333For instance, you could use this hook to generate a license file containing the license of all your dependencies.
3434
35+ ### ` preStart `
36+
37+ * ** Arguments:**
38+ * ** ` config: ` ** [ ** ` ResolvedForgeConfig ` ** ] ( https://js.electronforge.io/interfaces/\_ electron\_ forge\_ shared\_ types.ResolvedForgeConfig.html ) - Forge configuration object
39+ * ** Returns: ` Promise<void> ` **
40+
41+ ` preStart() ` is invoked before Forge's ** ` start ` ** command launches the app in dev mode.
42+
43+ You can use this hook to run prepatory logic before your app launches.
44+
45+ {% code title="forge.config.js" fullWidth="false" %}
46+ ``` javascript
47+ module .exports = {
48+ hooks: {
49+ preStart: async (forgeConfig ) => {
50+ console .log (` Starting up app on platform: ${ process .platform } ` );
51+ }
52+ }
53+ };
54+ ```
55+ {% endcode %}
56+
3557### ` postStart `
3658
3759* ** Arguments:**
You can’t perform that action at this time.
0 commit comments