Socket
Book a DemoInstallSign in
Socket

gulp-batman-templates

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-batman-templates

Turn HTML files into JS code to preload batman.js templates

0.0.1
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

gulp-batman-templates

This is gulp port of davemo/grunt-batman-templates. Bravo to him for thinking this up.

Example:

Lets say you have some .jade files that you want to preload in your batman.js app:

var gulp = require('gulp');
var concat = require('gulp-concat');
var jade = require('gulp-jade');
var batmanTemplates = require("./public/batman/gulp-batman-templates")

gulp.task("html", function(){
  gulp.src(["./public/batman/html/**/*.jade"])  // Load the .jade files
    .pipe(jade())                               // Convert to HTML and
    .pipe(batmanTemplates())                    // Convert to JavaScript for Batman.HTMLStore
    .pipe(concat('templates.js'))               // Join all into one file
    .pipe(gulp.dest("./public/batman/build/"))  // Spit that file out!
})

Now, make sure templates.js is included in your app:

  <script src='/path/to/batman.js'></script>
  <script src='/path/to/my_app.js'></script>
  <script src='/path/to/templates.js'></script>

You're done!

Keywords

gulpplugin

FAQs

Package last updated on 20 Mar 2014

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.