Socket
Socket
Sign inDemoInstall

templatizer

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

templatizer - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "templatizer",
"version": "0.0.1",
"version": "0.0.2",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -5,0 +5,0 @@ "description": "Simple solution for compiling jade templates into vanilla JS functions for blazin' fast client-side use.",

@@ -16,4 +16,5 @@ # templatizer.js

1. `npm install templatizer`
1. Write all your templates as individual jade files in a folder in your project.
2. Somewhere in your build process do this:
1. Somewhere in your build process do this:

@@ -20,0 +21,0 @@ ```js

@@ -13,3 +13,11 @@ var jade = require('jade'),

// we var scope it so it doesn't create a global
var output = [
var jadeRuntime, output;
try {
jadeRuntime = fs.readFileSync(__dirname + '/../jade/runtime.min.js');
} catch (e) {
jadeRuntime = fs.readFileSync(__dirname + '/node_modules/jade/runtime.min.js');
}
output = [
'(function () {',

@@ -19,3 +27,3 @@ 'var root = this, exports = {};',

'// The jade runtime:',
'var ' + fs.readFileSync(__dirname + '/node_modules/jade/runtime.min.js'),
'var ' + jadeRuntime,
''

@@ -22,0 +30,0 @@ ].join('\n');

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