templatizer
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "templatizer", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"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.", |
@@ -39,2 +39,2 @@ var templatizer = require('./templatizer'), | ||
console.log('\n\ntemplatizer.js'.bold + ' was with love by ' + yetify.logo() + ' for you!' + ' <3'.red + '\n'); | ||
console.log('\n\ntemplatizer.js'.bold + ' was made with love by ' + yetify.logo() + ' for you!' + ' <3'.red + '\n'); |
@@ -18,2 +18,5 @@ var jade = require('jade'), | ||
var isWindows = process.platform === 'win32'; | ||
var pathSep = path.sep || ( isWindows ? '\\' : '/' ); | ||
try { | ||
@@ -47,3 +50,3 @@ jadeRuntime = fs.readFileSync(__dirname + '/../jade/runtime.min.js'); | ||
folders = _.sortBy(folders, function (folder) { | ||
var arr = folder.split(path.sep); | ||
var arr = folder.split(pathSep); | ||
return arr.length; | ||
@@ -54,3 +57,3 @@ }); | ||
folders.forEach(function (folder) { | ||
var arr = folder.split(path.sep); | ||
var arr = folder.split(pathSep); | ||
output += '\nexports.' + arr.join('.') + ' = {};'; | ||
@@ -64,3 +67,3 @@ }); | ||
var dirname = path.dirname(file), | ||
arr = dirname.split(path.sep); | ||
arr = dirname.split(pathSep); | ||
if (dirname === '.') return name; | ||
@@ -96,2 +99,2 @@ arr.push(name); | ||
return output; | ||
}; | ||
}; |
@@ -17,2 +17,2 @@ var templatizer = require('./templatizer'), | ||
console.log('templatizer.js'.bold + ' was with love by ' + yetify.logo() + ' for you!' + ' <3'.red + '\n'); | ||
console.log('templatizer.js'.bold + ' was made with love by ' + yetify.logo() + ' for you!' + ' <3'.red + '\n'); |
30764
720