mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
28 lines
508 B
JavaScript
28 lines
508 B
JavaScript
|
var fs = require('fs-extra');
|
||
|
var uuid = require('node-uuid');
|
||
|
|
||
|
var v = uuid.v1();
|
||
|
|
||
|
var output = [
|
||
|
'var CHECKSUM = {',
|
||
|
'build: \'' + v + '\'',
|
||
|
'};',
|
||
|
'module.exports = CHECKSUM;'
|
||
|
];
|
||
|
|
||
|
// Should output a json file, but webpack2 json-loader is broken
|
||
|
// at the moment, so we're outputting a js file instead
|
||
|
|
||
|
fs.writeFile('./src/checksum.js', output.join('\n'), function (error) {
|
||
|
|
||
|
if (error)
|
||
|
{
|
||
|
throw error;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
console.log('Building #' + v);
|
||
|
}
|
||
|
|
||
|
});
|