Skip to content

Commit

Permalink
Docs: 1.5.0 Version
Browse files Browse the repository at this point in the history
  • Loading branch information
pandaoh committed Apr 13, 2024
1 parent 07e32af commit dae7890
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions bin/xcmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @Author: HxB
* @Date: 2022-04-25 16:27:06
* @LastEditors: DoubleAm
* @LastEditTime: 2024-04-12 22:43:01
* @LastEditTime: 2024-04-13 10:47:58
* @Description: 命令处理文件
* @FilePath: \js-xcmd\bin\xcmd.js
*/
Expand Down Expand Up @@ -388,11 +388,16 @@ program
});

program
.option('ig', 'ig')
.command('ig')
.action(() => {
let cmdStr =
'npm i nrm pnpm cnpm js-xcmd nodemon pm2 yarn rimraf protobufjs protobufjs-cli create-react-app @vue/cli @angular/cli cordova -g';
.option('ig [all]', 'ig [all]')
.command('ig [all]')
.action((all) => {
let cmdStr = '';
if (!all) {
cmdStr = 'npm i nrm pnpm js-xcmd nodemon pm2 yarn rimraf -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';
}
console.log({ cmdStr });
nodeCmd.run(cmdStr, (err, data, stderr) => {
console.log(stderr);
Expand All @@ -408,6 +413,7 @@ program
.action((src) => {
let cmdStr = '';
if (src) {
src = src.replace(/[\'\"\‘\’\“\”]/g, '');
console.log(`----------${src}-Dev----------`);
cmdStr = `pnpm --filter ${src} dev`;
} else {
Expand All @@ -428,6 +434,7 @@ program
.action((src) => {
let cmdStr = '';
if (src) {
src = src.replace(/[\'\"\‘\’\“\”]/g, '');
console.log(`----------${src}-Start----------`);
cmdStr = `pnpm --filter ${src} start`;
} else {
Expand All @@ -448,6 +455,7 @@ program
.action((src) => {
let cmdStr = '';
if (src) {
src = src.replace(/[\'\"\‘\’\“\”]/g, '');
console.log(`----------${src}-Build----------`);
cmdStr = `pnpm --filter ${src} build`;
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "js-xcmd",
"version": "1.4.13",
"version": "1.5.0",
"description": "XCmd library for node.js.",
"main": "main.js",
"bin": {
Expand Down

0 comments on commit dae7890

Please sign in to comment.