-var fs = require('fs'),\r
- uglifyJS = require('uglify-js'),\r
- _ = require('lodash'),\r
- po2json = require('po2json'),\r
- config = require('../server/configuration.js');\r
+var fs = require('fs'),\r
+ uglifyJS = require('uglify-js'),\r
+ _ = require('lodash'),\r
+ po2json = require('po2json'),\r
+ config = require('../server/configuration.js'),\r
+ package_json = require('../package.json');\r
\r
var FILE_ENCODING = 'utf-8',\r
EOL = '\n';\r
*/\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 || '/kiwi');\r
+ .replace(new RegExp('<%base_path%>', 'g'), config.get().http_base_path || '/kiwi')\r
+ .replace(new RegExp('<%build_version%>', 'g'), package_json.version);\r
\r
fs.writeFile(__dirname + '/index.html', index_src, { encoding: FILE_ENCODING }, function (err) {\r
if (!err) {\r
* and data (think: plugins)\r
*/\r
_kiwi.global = {\r
+ build_version: '', // Kiwi IRC version this is built from (Set from index.html)\r
settings: undefined, // Instance of _kiwi.model.DataStore\r
plugins: undefined,\r
utils: undefined, // TODO: Re-usable methods\r
\r
// Run after all dependancies have been loaded\r
jobs.onFinish(function startApp() {\r
+ // Kiwi IRC version this is built from\r
+ kiwi.build_version = '<%build_version%>';\r
+\r
// Start the app\r
kiwi.start(opts, function() {\r
// Load any plugins\r