mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 00:53:42 +00:00
1b77dc4fa4
This commit brings the following updates: - Removal of the following redundant or unused packages: - `json-loader`: Webpack 2 can handle JSON files by default; - `copy-webpack-plugin`: unused; - `webpack-dev-server`: unused. - Upgrade of the following packages to their latest versions: - `fs-extra`; - `webpack`: upgraded to the latest stable version; - `webpack-shell-plugin`. - Addition of the following packages: - `uuid`, in replacement of the deprecated `node-uuid`, with no changes to the public API. - `eslint`, with ESLint linting utility. - Addition of two runnable scripts to help development tasks: - `build`: An alias for running `webpack`. - `eslint`: Alias for running ESLint using the provided configuration in the project. - Fix the package entry point, so package consumers will be capable to use library in a future release. - Update `.npmignore`, so npm will include only the relevant package files. - Some clean-up and a few code fixes.
27 lines
503 B
JavaScript
27 lines
503 B
JavaScript
var fs = require('fs-extra');
|
|
var uuid = require('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);
|
|
}
|
|
|
|
});
|