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