/**\r
* Build the index.html file\r
*/\r
+var build_time = new Date().getTime();\r
\r
var index_src = fs.readFileSync(__dirname + '/src/index.html.tmpl', FILE_ENCODING)\r
.replace(new RegExp('<%base_path%>', 'g'), config.get().http_base_path || '')\r
- .replace(new RegExp('<%build_version%>', 'g'), package_json.version);\r
-\r
+ .replace(new RegExp('<%build_version%>', 'g'), package_json.version)\r
+ .replace(new RegExp('<%build_time%>', 'g'), build_time);\r
+ \r
fs.writeFile(__dirname + '/index.html', index_src, { encoding: FILE_ENCODING }, function (err) {\r
if (!err) {\r
console.log('Built index.html');\r
\r
<link rel="shortcut icon" href="<%base_path%>/assets/img/favicon.ico">\r
\r
-<link rel="stylesheet" type="text/css" href="<%base_path%>/assets/css/style.css" />\r
+<link rel="stylesheet" type="text/css" href="<%base_path%>/assets/css/style.css?t=<%build_time%>" />\r
<link rel="stylesheet" type="text/css" href="<%base_path%>/assets/css/font-awesome.min.css" />\r
</head>\r
<body>\r
\r
// If we're not interested in debug libs, start loading production files\r
if (!getQueryVariable('debug')) {\r
- scripts.push(['assets/libs/lodash.min.js']);\r
+ scripts.push(['assets/libs/lodash.min.js?t=<%build_time%>']);\r
scripts.push([\r
- 'assets/libs/backbone.min.js',\r
- 'assets/libs/jed.js'\r
+ 'assets/libs/backbone.min.js?t=<%build_time%>',\r
+ 'assets/libs/jed.js?t=<%build_time%>'\r
]);\r
scripts.push([\r
- 'assets/kiwi.min.js',\r
- 'assets/libs/engine.io.bundle.min.js'\r
+ 'assets/kiwi.min.js?t=<%build_time%>',\r
+ 'assets/libs/engine.io.bundle.min.js?t=<%build_time%>'\r
]);\r
\r
loadNextScript();\r