puglatizer.js
function(callback) {
			fs.appendFileSync(outputFile,";(function(root,factory){\r\n")
			fs.appendFileSync(outputFile,"    if (typeof define === 'function' && define.amd) {\r\n")
			fs.appendFileSync(outputFile,"        define([], factory);\r\n")
			fs.appendFileSync(outputFile,"    } else if (typeof exports === 'object') {\r\n")
			fs.appendFileSync(outputFile,"        module.exports = factory();\r\n")
			fs.appendFileSync(outputFile,"    } else {\r\n")
			fs.appendFileSync(outputFile,"        if (typeof root === 'undefined' || root !== Object(root)) {\r\n")
			fs.appendFileSync(outputFile,"            throw new Error('puglatizer: window does not exist or is not an object');\r\n")
			fs.appendFileSync(outputFile,"        }\r\n")
			fs.appendFileSync(outputFile,"        root.puglatizer = factory();\r\n")
			fs.appendFileSync(outputFile,"    }\r\n")
			fs.appendFileSync(outputFile,"}(this, function () {\r\n")
			fs.appendFileSync(outputFile,"    function pug_classes_object(val) { var classString = '', padding = ''; for (var key in val) { if (key && val[key] && pug_has_own_property.call(val, key)) { var classString = classString + padding + key; var padding = ' '; } } return classString; }")
			fs.appendFileSync(outputFile,"    function pug_classes_array(val, escaping) { var classString = '', className, padding = '', escapeEnabled = Array.isArray(escaping); for (var i = 0; i < val.length; i++) { var className = pug_classes(val[i]); if (!className) continue; escapeEnabled && escaping[i] && (className = pug_escape(className)); var classString = classString + padding + className; var padding = ' '; } return classString; }")
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.merge.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.classes.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.style.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.attr.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.attrs.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.escape.toString()).replace('pug_match_html','(/[\"&<>]/)') + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.rethrow.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    var pug = {\r\n")
			fs.appendFileSync(outputFile,"    	merge:" + minify.js(pug.runtime.merge.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	classes:" + minify.js(pug.runtime.classes.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	style:" + minify.js(pug.runtime.style.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	attr:" + minify.js(pug.runtime.attr.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	attrs:" + minify.js(pug.runtime.attrs.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	escape:" + minify.js(pug.runtime.escape.toString()).replace('pug_match_html','(/[\"&<>]/)') + ',\r\n')
			fs.appendFileSync(outputFile,"    	rethrow:" + minify.js(pug.runtime.rethrow.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    }\r\n")
			fs.appendFileSync(outputFile,"\r\n")
			fs.appendFileSync(outputFile,'    var puglatizer = {}')
			fs.appendFileSync(outputFile,"\r\n")
			return callback()
		}
function(callback) {
			fs.appendFileSync(outputFile,";(function(root,factory){\r\n")
			fs.appendFileSync(outputFile,"    if (typeof define === 'function' && define.amd) {\r\n")
			fs.appendFileSync(outputFile,"        define([], factory);\r\n")
			fs.appendFileSync(outputFile,"    } else if (typeof exports === 'object') {\r\n")
			fs.appendFileSync(outputFile,"        module.exports = factory();\r\n")
			fs.appendFileSync(outputFile,"    } else {\r\n")
			fs.appendFileSync(outputFile,"        if (typeof root === 'undefined' || root !== Object(root)) {\r\n")
			fs.appendFileSync(outputFile,"            throw new Error('puglatizer: window does not exist or is not an object');\r\n")
			fs.appendFileSync(outputFile,"        }\r\n")
			fs.appendFileSync(outputFile,"        root.puglatizer = factory();\r\n")
			fs.appendFileSync(outputFile,"    }\r\n")
			fs.appendFileSync(outputFile,"}(this, function () {\r\n")
			fs.appendFileSync(outputFile,"    function pug_classes_object(val) { var classString = '', padding = ''; for (var key in val) { if (key && val[key] && pug_has_own_property.call(val, key)) { var classString = classString + padding + key; var padding = ' '; } } return classString; }")
			fs.appendFileSync(outputFile,"    function pug_classes_array(val, escaping) { var classString = '', className, padding = '', escapeEnabled = Array.isArray(escaping); for (var i = 0; i < val.length; i++) { var className = pug_classes(val[i]); if (!className) continue; escapeEnabled && escaping[i] && (className = pug_escape(className)); var classString = classString + padding + className; var padding = ' '; } return classString; }")
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.merge.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.classes.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.style.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.attr.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.attrs.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.escape.toString()).replace('pug_match_html','(/[\"&<>]/)') + '\r\n')
			fs.appendFileSync(outputFile,"    " + minify.js(pug.runtime.rethrow.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    var pug = {\r\n")
			fs.appendFileSync(outputFile,"    	merge:" + minify.js(pug.runtime.merge.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	classes:" + minify.js(pug.runtime.classes.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	style:" + minify.js(pug.runtime.style.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	attr:" + minify.js(pug.runtime.attr.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	attrs:" + minify.js(pug.runtime.attrs.toString()) + ',\r\n')
			fs.appendFileSync(outputFile,"    	escape:" + minify.js(pug.runtime.escape.toString()).replace('pug_match_html','(/[\"&<>]/)') + ',\r\n')
			fs.appendFileSync(outputFile,"    	rethrow:" + minify.js(pug.runtime.rethrow.toString()) + '\r\n')
			fs.appendFileSync(outputFile,"    }\r\n")
			fs.appendFileSync(outputFile,"\r\n")
			fs.appendFileSync(outputFile,'    var puglatizer = {}')
			fs.appendFileSync(outputFile,"\r\n")
			return callback()
		}
function ( callback ) { fs . appendFileSync ( outputFile , ";(function(root,factory){\r\n" ) fs . appendFileSync ( outputFile , "    if (typeof define === 'function' && define.amd) {\r\n" ) fs . appendFileSync ( outputFile , "        define([], factory);\r\n" ) fs . appendFileSync ( outputFile , "    } else if (typeof exports === 'object') {\r\n" ) fs . appendFileSync ( outputFile , "        module.exports = factory();\r\n" ) fs . appendFileSync ( outputFile , "    } else {\r\n" ) fs . appendFileSync ( outputFile , "        if (typeof root === 'undefined' || root !== Object(root)) {\r\n" ) fs . appendFileSync ( outputFile , "            throw new Error('puglatizer: window does not exist or is not an object');\r\n" ) fs . appendFileSync ( outputFile , "        }\r\n" ) fs . appendFileSync ( outputFile , "        root.puglatizer = factory();\r\n" ) fs . appendFileSync ( outputFile , "    }\r\n" ) fs . appendFileSync ( outputFile , "}(this, function () {\r\n" ) fs . appendFileSync ( outputFile , "    function pug_classes_object(val) { var classString = '', padding = ''; for (var key in val) { if (key && val[key] && pug_has_own_property.call(val, key)) { var classString = classString + padding + key; var padding = ' '; } } return classString; }" ) fs . appendFileSync ( outputFile , "    function pug_classes_array(val, escaping) { var classString = '', className, padding = '', escapeEnabled = Array.isArray(escaping); for (var i = 0; i < val.length; i++) { var className = pug_classes(val[i]); if (!className) continue; escapeEnabled && escaping[i] && (className = pug_escape(className)); var classString = classString + padding + className; var padding = ' '; } return classString; }" ) fs . appendFileSync ( outputFile , "    " + minify . js ( pug . runtime . merge . toString ( ) ) + '\r\n' ) fs . appendFileSync ( outputFile , "    " + minify . js ( pug . runtime . classes . toString ( ) ) + '\r\n' ) fs . appendFileSync ( outputFile , "    " + minify . js ( pug . runtime . style . toString ( ) ) + '\r\n' ) fs . appendFileSync ( outputFile , "    " + minify . js ( pug . runtime . attr . toString ( ) ) + '\r\n' ) fs . appendFileSync ( outputFile , "    " + minify . js ( pug . runtime . attrs . toString ( ) ) + '\r\n' ) fs . appendFileSync ( outputFile , "    " + minify . js ( pug . runtime . escape . toString ( ) ) . replace ( 'pug_match_html' , '(/[\"&<>]/)' ) + '\r\n' ) fs . appendFileSync ( outputFile , "    " + minify . js ( pug . runtime . rethrow . toString ( ) ) + '\r\n' ) fs . appendFileSync ( outputFile , "    var pug = {\r\n" ) fs . appendFileSync ( outputFile , "    	merge:" + minify . js ( pug . runtime . merge . toString ( ) ) + ',\r\n' ) fs . appendFileSync ( outputFile , "    	classes:" + minify . js ( pug . runtime . classes . toString ( ) ) + ',\r\n' ) fs . appendFileSync ( outputFile , "    	style:" + minify . js ( pug . runtime . style . toString ( ) ) + ',\r\n' ) fs . appendFileSync ( outputFile , "    	attr:" + minify . js ( pug . runtime . attr . toString ( ) ) + ',\r\n' ) fs . appendFileSync ( outputFile , "    	attrs:" + minify . js ( pug . runtime . attrs . toString ( ) ) + ',\r\n' ) fs . appendFileSync ( outputFile , "    	escape:" + minify . js ( pug . runtime . escape . toString ( ) ) . replace ( 'pug_match_html' , '(/[\"&<>]/)' ) + ',\r\n' ) fs . appendFileSync ( outputFile , "    	rethrow:" + minify . js ( pug . runtime . rethrow . toString ( ) ) + '\r\n' ) fs . appendFileSync ( outputFile , "    }\r\n" ) fs . appendFileSync ( outputFile , "\r\n" ) fs . appendFileSync ( outputFile , '    var puglatizer = {}' ) fs . appendFileSync ( outputFile , "\r\n" ) return callback ( ) }
Create the initial file
Create the initial file