|
@@ -13,7 +13,7 @@ var TerraformError = exports.TerraformError = require("../error").TerraformError
|
|
|
*/
|
|
|
|
|
|
var processors = exports.processors = {
|
|
|
- "html": ["jade", "ejs", "md", "nunjucks"],
|
|
|
+ "html": ["jade", "ejs", "md", "nunjucks", "njk"],
|
|
|
"css" : ["styl", "less", "scss", "sass"],
|
|
|
"js" : ["coffee"]
|
|
|
}
|
|
@@ -161,7 +161,7 @@ var findNearestLayout = exports.findNearestLayout = function(rootPath, dirPath)
|
|
|
|
|
|
/**
|
|
|
* Find Default Layout
|
|
|
- *
|
|
|
+ *
|
|
|
* returns null if outputing json
|
|
|
*/
|
|
|
|
|
@@ -170,7 +170,7 @@ var findDefaultLayout = exports.findDefaultLayout = function(rootPath, filePath)
|
|
|
if (arr.length > 2 && arr[1] == "json"){
|
|
|
return null
|
|
|
} else {
|
|
|
- return findNearestLayout(rootPath, path.dirname(filePath))
|
|
|
+ return findNearestLayout(rootPath, path.dirname(filePath))
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -528,11 +528,11 @@ exports.needsBrowserify = function(source) {
|
|
|
|
|
|
/**
|
|
|
* shouldApplyLayout
|
|
|
- *
|
|
|
+ *
|
|
|
* returns true if an HTML template engine does not include a partial/layout system and terraform should handle that
|
|
|
*/
|
|
|
-
|
|
|
+
|
|
|
exports.shouldApplyLayout = function(ext) {
|
|
|
- var extsWithLayout = ["nunjucks"]
|
|
|
+ var extsWithLayout = ["nunjucks", "njk"]
|
|
|
return (extsWithLayout.indexOf(ext) < 0)
|
|
|
-}
|
|
|
+}
|