Socket
Socket
Sign inDemoInstall

@cloudcannon/gulp-ejs-template

Package Overview
Dependencies
17
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cloudcannon/gulp-ejs-template

🔧 create a compiled ejs file with window.JST exposed


Version published
Weekly downloads
2
increased by100%
Maintainers
2
Install size
1.13 MB
Created
Weekly downloads
 

Readme

Source

@cloudcannon/gulp-ejs-template

🔧 create a compiled ejs file with window.JST exposed. Uses underscore's template function to match the rails pipeline.

ejs template plugin for gulp

Usage

Install @cloudcannon/gulp-ejs-template as a development dependency:

npm install --save-dev @cloudcannon/gulp-ejs-template

Then, add it to your gulpfile.js:

var ejs = require("@cloudcannon/gulp-ejs-template")
var concat = require("gulp-concat");
var rename = require("gulp-rename");
var gap = require("gulp-append-prepend");

gulp.task("ejs", function () {
	return gulp.src("templates/**/*.jst.ejs")
		.pipe(ejs())
		.pipe(rename(function (path) {
			path.extname = ".js";
		}))
		.pipe(concat(".jst-cache.js"))
		.pipe(gap.prependText("window.JST = window.JST || {};"))
		.pipe(gulp.dest("app/assets/javascripts/"));
});

License

MIT License

FAQs

Last updated on 20 Nov 2018

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