Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdiansyah0611 committed Mar 14, 2022
1 parent 5f1f9bf commit 041a454
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .doc/docs/guide/simple-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ Run previous command.
Clear the history command.
```bash
clear
```
Get version of tools-web.
```bash
-v
```
7 changes: 6 additions & 1 deletion shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Shell{
}
}
this.root = this.env.root
this.version = 'v1.0'
this.framework = null
this.LIST = ['react', 'vue', 'express']
this.arg = []
Expand Down Expand Up @@ -109,7 +110,6 @@ class Shell{
}
this.history.push(this.arg)


if(this.LIST.indexOf(firstArg) !== -1){
this.framework = firstArg
isFound = true
Expand Down Expand Up @@ -197,6 +197,11 @@ class Shell{
})
this.exit()
}
if(['-v', '--version'].indexOf(firstArg) !== -1){
isFound = true
this.log(this.version)
this.exit()
}
var handle = () => {
if(this.startcli && !isFound){
const checkIndex = (text, arg1, arg2) => {
Expand Down

1 comment on commit 041a454

@vercel
Copy link

@vercel vercel bot commented on 041a454 Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.