Example #1
0
	self._genTemplateCode = function(filePath) {
		var url = pathManager.pathToURL(filePath);
		if(!fs.existsSync(filePath)) {
			return null;
		}
		
		var content = fs.readFileSync(filePath, 'utf8');
		var code = "$loader.grab._loadableResourceMap['" + url + "'] = new $loader.Template('" + url + "');\n";
		code += "$loader.grab._loadableResourceMap['" + url + "'].make('" + self._stringifyHTML(content) + "');\n";
		
		return code;
	}