diff --git a/User-Menu-Cookbook.md b/User-Menu-Cookbook.md index 14f961e..9be4cbf 100644 --- a/User-Menu-Cookbook.md +++ b/User-Menu-Cookbook.md @@ -160,4 +160,30 @@ function compare(a, b) { return result; } +``` + +## Execute Npm Script + +```js +module.exports = { + 'D - Build Dev': async ({CloudCmd}) => { + await CloudCmd.TerminalRun.show({ + command: 'npm run build:client:dev', + autoClose: false, + // custom close message + closeMessage: 'Press any button to close Terminal', + }); + + CloudCmd.refresh(); + }, + 'P - Build Prod': async ({CloudCmd}) => { + await CloudCmd.TerminalRun.show({ + command: 'npm run build:client', + // close window when done + autoClose: true, + }); + + CloudCmd.refresh(); + }, +} ``` \ No newline at end of file