Socket
Socket
Sign inDemoInstall

gulp-dotify

Package Overview
Dependencies
149
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-dotify

Gulp plugin for precompilation of doT templates.


Version published
Weekly downloads
206
decreased by-5.5%
Maintainers
1
Install size
2.09 MB
Created
Weekly downloads
 

Readme

Source

gulp-dotify

Gulp plugin for precompilation of doT templates.

Status

Build Status Code Climate Coverage Status

NPM

Example

If we have following folder structure:

app/views/users/list.html
app/views/users/detail.html
app/views/products/list.html
app/views/products/detail.html
app/views/layout.html

Then, running this code:

gulp.task('templates', function() {
	gulp.src('app/views/**/*.html')
	.pipe(dotify())
	.pipe(concat('templates.js'))
	.pipe(header('window.JST = {};'))
	.pipe(gulp.dest('public/js'));
});

Will produce public/js/templates.js:

window.JST = {};
JST['users-list'] = function ...
JST['users-detail'] = function ...
...
JST['layout'] = function ...

Options

  • root -- root folder, where templates are located (affects template name generation), views by default
  • extension -- file extension of template files, .html by default
  • separator -- template namespace-name separator, - by default
  • dictionary -- template dictionary name, JST by default

License

MIT

Keywords

FAQs

Last updated on 10 Apr 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc