Skip to content

Commit

Permalink
Merge pull request #33 from tikui/add-example-for-create
Browse files Browse the repository at this point in the history
Add Example for create command and add tikui command
  • Loading branch information
pascalgrimaud authored Jun 20, 2022
2 parents fdf447a + 4c6e0c7 commit 36fa9da
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ npm install --global

## Use

When installed, launch `tikuicli` command and follow help to use the CLI.
When installed, launch `tikui` command and follow help to use the CLI.
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tikui/cli",
"version": "1.1.2",
"version": "1.2.0",
"description": "Command lines tool for Tikui",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -64,6 +64,7 @@
"@": "dist"
},
"bin": {
"tikuicli": "./dist/bin/tikuicli.js"
"tikuicli": "./dist/bin/tikuicli.js",
"tikui": "./dist/bin/tikuicli.js"
}
}
4 changes: 2 additions & 2 deletions src/bin/tikuicli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ try {
program
.command('create <component> [destination]')
.option('-p, --prefix <name>', 'prefix')
.description('create a component')
.description('create a component.')
.addHelpText('after', '\nExample:\n $ tikui create -p tikui component src/atom')
.action((component, destination, options) => {
createComponent(destination, component, options.prefix);
console.log(`Creating component ${component} to ${path.resolve(destination)}`); // eslint-disable-line no-console
Expand All @@ -20,4 +21,3 @@ try {
console.error(e.message); // eslint-disable-line no-console
process.exit(1);
}

0 comments on commit 36fa9da

Please sign in to comment.