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

templatizer

Package Overview
Dependencies
Maintainers
3
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 1.3.0 to 1.4.0

3

package.json
{
"name": "templatizer",
"description": "Simple solution for compiling jade templates into vanilla JS functions for blazin' fast client-side use.",
"version": "1.3.0",
"version": "1.4.0",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -25,2 +25,3 @@ "bin": "./bin/cli",

"lodash": "^3.2.0",
"minimatch": "^2.0.7",
"minimist": "^0.1.0",

@@ -27,0 +28,0 @@ "uglify-js": "^2.4.0",

@@ -123,2 +123,6 @@ # templatizer.js

#### `globOptions` (object, default `{}`)
`globOptions` will be passed directly to `node-glob`. See the [API docs](https://github.com/isaacs/node-glob#options) for available options.
### Mixin Support

@@ -125,0 +129,0 @@

@@ -15,2 +15,3 @@ var jade = require('jade');

var glob = require('glob');
var minimatch = require("minimatch");

@@ -35,2 +36,3 @@ // Setting dynamicMixins to true will result in

inlineJadeRuntime: true,
globOptions: {},
jade: {},

@@ -40,4 +42,5 @@ namespace: '' // No namespace means 'window'

if (typeof templateDirectories === "string") {
templateDirectories = glob.sync(templateDirectories);
templateDirectories = glob.sync(templateDirectories, options.globOptions);
}

@@ -51,3 +54,3 @@

amdDependencies = options.amdDependencies.toString();
}
}

@@ -106,2 +109,13 @@ var namespace = _.isString(options.namespace) ? options.namespace : '';

}
// Skip files not matching the initial globbing pattern
if(options.globOptions.ignore) {
var match = function (ignorePattern) {
return minimatch(file, ignorePattern);
};
if(options.globOptions.ignore.some(match)) {
return;
}
}
if (path.extname(item) === '' && path.basename(item).charAt(0) !== '.') {

@@ -175,3 +189,3 @@ if (folders.indexOf(item) === -1) folders.push(item);

wrappedJade = '';
var indentOutput = output.split('\n').map(function (l) { return l ? ' ' + l : l; }).join('\n');

@@ -178,0 +192,0 @@ var finalOutput = outputTemplate

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