Skip to content

Commit

Permalink
fix on README
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Sep 2, 2014
1 parent bb6c759 commit 64be6e7
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,22 @@ GoRazor is the Go port of the razor view engine originated from [asp.net in 2011
Install:

```sh
go get gopkg.in/fsnotify.v1
go get github.com/sipin/gorazor
```

Usage:

`gorazor template_folder output_folder` or
`gorazor template_file output_file`
`gorazor template_file output_file` or

`gorazor -watch input_dir output_dir` to auto re-generate code when file changes.

```bash
new/modify -> generate corresponding Go file, make new directory if necessary
remove -> remove corresponding Go file or directory
```
# Syntax
Expand Down Expand Up @@ -289,17 +298,6 @@ Here is a simple example of [gorazor templates](https://github.com/sipin/gorazor
(setq web-mode-engines-alist '(("razor" . "\\.gohtml\\'")))
```
## How to auto re-generate when gohtml file changes?

We use `https://gopkg.in/fsnotify.v1` to implement watching option.

Useage: `gorazor -watch input_dir output_dir` to re-generate gohtml file changes,

```bash
new/modify -> generate corresponding Go file, make new directory if necessary
remove -> remove corresponding Go file or directory
```
# Credits
The very [first version](https://github.com/sipin/gorazor/releases/tag/vash) of GoRazor is essentially a hack of razor's port in javascript: [vash](https://github.com/kirbysayshi/vash), thus requires node's to run.
Expand Down

0 comments on commit 64be6e7

Please sign in to comment.