-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* @Author: HxB | ||
* @Date: 2022-04-25 16:27:06 | ||
* @LastEditors: DoubleAm | ||
* @LastEditTime: 2024-05-24 10:26:54 | ||
* @LastEditTime: 2024-06-20 16:49:52 | ||
* @Description: 命令处理文件 | ||
* @FilePath: \js-xcmd\bin\xcmd.js | ||
*/ | ||
|
@@ -422,10 +422,10 @@ program | |
.action((all) => { | ||
let cmdStr = ''; | ||
if (!all) { | ||
cmdStr = 'npm i nrm pnpm js-xcmd nodemon pm2 yarn rimraf -g'; | ||
cmdStr = 'npm i nrm pnpm js-xcmd nodemon pm2 yarn rimraf turbo tsx taze knip yalc -g'; | ||
} else { | ||
cmdStr = | ||
'npm i nrm pnpm js-xcmd nodemon pm2 yarn rimraf protobufjs protobufjs-cli create-react-app @vue/cli @angular/cli cordova cnpm -g -force'; | ||
'npm i nrm pnpm js-xcmd nodemon pm2 yarn rimraf turbo tsx taze knip yalc protobufjs protobufjs-cli @changesets/cli create-react-app @vue/cli @angular/cli cordova cnpm -g -force'; | ||
} | ||
console.log({ cmdStr }); | ||
nodeCmd.run(cmdStr, (err, data, stderr) => { | ||
|
@@ -436,6 +436,40 @@ program | |
}); | ||
}); | ||
|
||
program | ||
.option('i-react-tools', 'i-react-tools') | ||
.command('i-react-tools') | ||
.description('安装 react 开发相关库') | ||
.action(() => { | ||
// zod react-hook-form @tanstack/react-query | ||
// @mui/material @mui/lab @mui/base @mui/system @mui/utils @mui/types | ||
// rebass | ||
let cmdStr = | ||
'npm i ahooks rxjs dayjs @sigi/[email protected] @sigi/[email protected] @sigi/[email protected] @sigi/[email protected] @sigi/[email protected] @emotion/styled @emotion/css @emotion/react'; | ||
console.log({ cmdStr }); | ||
nodeCmd.run(cmdStr, (err, data, stderr) => { | ||
console.log(stderr); | ||
if (err) return console.log(`%c出错啦!${data}`, 'color:red;'); | ||
console.log(data); | ||
console.log('----------Successful----------'); | ||
}); | ||
}); | ||
|
||
program | ||
.option('i-vue-tools', 'i-vue-tools') | ||
.command('i-vue-tools') | ||
.description('安装 vue 开发相关库') | ||
.action(() => { | ||
let cmdStr = 'npm i ...'; | ||
console.log({ cmdStr }); | ||
nodeCmd.run(cmdStr, (err, data, stderr) => { | ||
console.log(stderr); | ||
if (err) return console.log(`%c出错啦!${data}`, 'color:red;'); | ||
console.log(data); | ||
console.log('----------Successful----------'); | ||
}); | ||
}); | ||
|
||
program | ||
.option('dev [src]', 'dev [src]') | ||
.command('dev [src]') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters