Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-tpl2json

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-tpl2json

Make template files into JSON

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

gulp-tpl2json

Make template files into JSON

Install

$ npm install --save-dev gulp-tpl2json

Usage

src/test1.tpl

<h1>Hello <%= name %></h1>

src/test2.tpl

<header>template <%= path %></header>

gulpfile.js

var gulp = require('gulp');
var tpl2json = require('gulp-tpl2json');

gulp.task('default', function () {
	return gulp.src('src/greeting.html')
		.pipe(tpl2json('template.js'/*, {newLine:'\n', expression:'var a = '}*/))
		.pipe(gulp.dest('dist'));
});

dist/template.js

{"test1.tpl":"<h1>Hello Sindre</h1>","test2.tpl":"<header>template <%= path %></header>"}

Notes

License

MIT

Keywords

FAQs

Package last updated on 10 Sep 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc