-
-
Notifications
You must be signed in to change notification settings - Fork 259
/
.cloudcmd.menu.js
45 lines (39 loc) · 1.22 KB
/
.cloudcmd.menu.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
'use strict';
module.exports = {
'F2 - Rename file': async ({DOM}) => {
await DOM.renameCurrent();
},
'L - Lint': async ({CloudCmd}) => {
const {TerminalRun} = CloudCmd;
await run(TerminalRun, 'npm run lint');
},
'F - Fix Lint': async ({CloudCmd}) => {
const {TerminalRun} = CloudCmd;
await run(TerminalRun, 'npm run fix:lint');
},
'T - Test': async ({CloudCmd}) => {
const {TerminalRun} = CloudCmd;
await run(TerminalRun, 'npm run test');
},
'C - Coverage': async ({CloudCmd}) => {
const {TerminalRun} = CloudCmd;
await run(TerminalRun, 'npm run coverage');
},
'D - Build Dev': async ({CloudCmd}) => {
const {TerminalRun} = CloudCmd;
await run(TerminalRun, 'npm run build:client:dev');
CloudCmd.refresh();
},
'P - Build Prod': async ({CloudCmd}) => {
const {TerminalRun} = CloudCmd;
await run(TerminalRun, 'npm run build:client');
CloudCmd.refresh();
},
};
async function run(TerminalRun, command) {
await TerminalRun.show({
command,
closeMessage: 'Press any key to close Terminal',
autoClose: false,
});
}