templatizer
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "templatizer", | ||
"description": "Simple solution for compiling jade templates into vanilla JS functions for blazin' fast client-side use.", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"author": "Henrik Joreteg <henrik@andyet.net>", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/HenrikJoreteg/templatizer/issues", |
@@ -61,6 +61,19 @@ # templatizer.js | ||
### Jade Options | ||
### Options | ||
Use `options.jade` to set options for when templatizer calls `jade.compile(file, options.jade)`. | ||
The third parameter passed to `templatizer` is an options object. | ||
Currently the only available option is `jade`, which is an object which will be passed directly to `jade.compile()`. See the [Jade API documentation](http://jade-lang.com/api/) for what options are available. | ||
Here's an example where we set the Jade `compileDebug` option to `true`. | ||
```js | ||
templatizer(templatesDir, outputFile, { | ||
// Options | ||
jade: { | ||
compileDebug: true | ||
} | ||
}); | ||
``` | ||
### Mixin Support | ||
@@ -67,0 +80,0 @@ |
@@ -58,5 +58,7 @@ var jade = require('jade'); | ||
templateDirectories.forEach(function (templateDirectory) { | ||
var contents = walkdir.sync(templateDirectory); | ||
if (!fs.existsSync(templateDirectory)) { | ||
throw new Error('Template directory ' + templateDirectory + ' does not exist.'); | ||
} | ||
contents.forEach(function (file) { | ||
walkdir.sync(templateDirectory).forEach(function (file) { | ||
var item = file.replace(path.resolve(templateDirectory), '').slice(1); | ||
@@ -63,0 +65,0 @@ if (path.extname(item) === '' && path.basename(item).charAt(0) !== '.') { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
182046
5162
122