mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) menu: add lint, fix:lint, test, coverage
This commit is contained in:
parent
6d1b18da07
commit
514644269c
1 changed files with 31 additions and 10 deletions
|
|
@ -4,22 +4,43 @@ module.exports = {
|
|||
'F2 - Rename file': async ({DOM}) => {
|
||||
await DOM.renameCurrent();
|
||||
},
|
||||
'D - Build Dev': async ({CloudCmd}) => {
|
||||
await CloudCmd.TerminalRun.show({
|
||||
command: 'npm run build:client:dev',
|
||||
autoClose: false,
|
||||
closeMessage: 'Press any key to close Terminal',
|
||||
});
|
||||
'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}) => {
|
||||
await CloudCmd.TerminalRun.show({
|
||||
command: 'npm run build:client',
|
||||
autoClose: true,
|
||||
});
|
||||
const {TerminalRun} = CloudCmd;
|
||||
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue