Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/connor4312/gulp-renderful
Precompile EJS to HTML with the power of Express!
https://github.com/connor4312/gulp-renderful
Last synced: about 1 month ago
JSON representation
Precompile EJS to HTML with the power of Express!
- Host: GitHub
- URL: https://github.com/connor4312/gulp-renderful
- Owner: connor4312
- Created: 2014-07-18T13:24:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-07T13:07:24.000Z (over 10 years ago)
- Last Synced: 2024-10-25T22:19:37.935Z (about 2 months ago)
- Language: JavaScript
- Size: 180 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Deprecated
At the time I wrote this, I wasn't aware that EJS had added `includes` and other more advanced features itself several versions ago. I recommend using [gulp-ejs](https://github.com/rogeriopvl/gulp-ejs) instead of this!
# gulp-renderful
This package is designed to make the building of static sites easier and more enjoyable. Rather than using ugly PHP `includes`, you can now use EJS templating (or whatever else you like) backed by Express to render HTML. This allows you to, for example, include view partials with `<%- include somepartial.ejs %>`.
## Example
```js
gulp.task('html', function() {
gulp.src('src/*.html')
.pipe(require('../gulp-renderful')())
.pipe(gulp.dest('./dist'));
});
```## Options: renderful([options])
### engine
Type: `object` Default: `require('ejs').renderFile`
Allows you to pass your own rendering engine in, to use instead of EJS.
### extensions
Type: `array` Default: `[]`
When a non-empty array, only files with these extensions will be processed. For more capabilities (e.g. globbing), you can take a look at [gulp-if](https://github.com/robrich/gulp-if).
### data
Type: `object` Default: `{}`
Data to be passed into the views.