mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
docs(cookbook) npm script
parent
f417c79c62
commit
02194da658
1 changed files with 26 additions and 0 deletions
|
|
@ -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();
|
||||
},
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue