https://github.com/magicdawn/gulp-razor-tmpl
gulp plugin for razor-tmpl
https://github.com/magicdawn/gulp-razor-tmpl
Last synced: 3 months ago
JSON representation
gulp plugin for razor-tmpl
- Host: GitHub
- URL: https://github.com/magicdawn/gulp-razor-tmpl
- Owner: magicdawn
- License: mit
- Created: 2014-09-05T12:39:12.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-04-08T19:30:26.000Z (about 9 years ago)
- Last Synced: 2025-01-10T19:13:54.123Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#gulp-razor-tmpl
gulp plugin for [razor-tmpl](https://github.com/magicdawn/razor-tmpl)
#Install
$ npm i gulp-razor-tmpl --save-dev
#Usage
in gulpfile.js
```js
var razor = require('gulp-razor-tmpl');
gulp.task('build',function() {
return gulp.src('template/**/*.razor')
.pipe(razor())
.pipe(gulp.dest('output'));
})
```
this will render `template/**/*.razor` to the `html` ext,this exmaple locates in the `test` folder
##Options
razor([option]) the option argument is optional
- ext : target extension,default = html
- ViewBag : the ViewBag data,default = null
##Tips
just as what I have done to razor-tmpl,you can use `_doc` property in repl
```shell
$ node
> razor = require('gulp-razor-tmpl')
> console.log(razor._doc)
```
#License
MIT