docs(cookbook) npm script

coderaiser 2019-05-28 19:09:15 +03:00
parent f417c79c62
commit 02194da658

@ -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();
},
}
```