Update version of the iris command line tool and readme explanations

This commit is contained in:
Makis Maropoulos 2016-06-03 15:08:11 +03:00
parent dc2b40283e
commit 04159fbb43
2 changed files with 22 additions and 6 deletions

View File

@ -4,7 +4,7 @@ This package is the command line tool for [../](https://github.com/kataras/iris
## Install ## Install
Current version: 0.0.1 Current version: 0.0.2
```sh ```sh
go get -u github.com/kataras/iris/iris go get -u github.com/kataras/iris/iris
@ -26,17 +26,33 @@ $ iris [command] [-flags]
**The create command** creates for you a start project in a directory **The create command** creates for you a start project in a directory
```sh
iris create -t basic -d ./
```
Will create the [basic](https://github.com/iris-contrib/iris-command-assets/tree/master/basic) sample package to the current working directory and run the app.
```sh
iris create -t static -d ./
```
Will create the [static](https://github.com/iris-contrib/iris-command-assets/tree/master/static) sample package to the current working directory and run the app.
The default
```sh ```sh
iris create iris create
``` ```
Will create the starter/basic project structure to the current working directory and run the app. Will create the basic sample package to the current working directory and run the app.
```sh ```sh
iris create -d C:\Users\kataras\Desktop\test1 iris create -d C:\Users\kataras\Desktop\test1
``` ```
Will create the starter/basic project structure to the C:\Users\kataras\Desktop\test1 folder and run the app. Will create the basic sample package to the C:\Users\kataras\Desktop\test1 folder and run the app.
## Version ## Version
@ -49,4 +65,4 @@ Will print the current iris' installed version to your machine
## TODO ## TODO
A lot more - [ ] Add more templates

View File

@ -31,12 +31,12 @@ var (
) )
func init() { func init() {
app = cli.NewApp("iris", "Command line tool for Iris web framework", "0.0.1") app = cli.NewApp("iris", "Command line tool for Iris web framework", "0.0.2")
app.Command(cli.Command("version", "\t prints your iris version").Action(func(cli.Flags) error { app.Printf("%s", iris.Version); return nil })) app.Command(cli.Command("version", "\t prints your iris version").Action(func(cli.Flags) error { app.Printf("%s", iris.Version); return nil }))
createCmd := cli.Command("create", "create a project to a given directory"). createCmd := cli.Command("create", "create a project to a given directory").
Flag("dir", "./", "-d ./ creates an iris starter kit to the current directory"). Flag("dir", "./", "-d ./ creates an iris starter kit to the current directory").
Flag("type", "basic", "creates the project based on the -t package. Available type is only 'basic', currently"). Flag("type", "basic", "creates the project based on the -t package. Currently, available types are 'basic' & 'static'").
Action(create) Action(create)
app.Command(createCmd) app.Command(createCmd)