mirror of
https://github.com/Ride-The-Lightning/RTL
synced 2024-11-09 13:10:44 +00:00
0d3ff90977
Merging Angular pre-build code
13 lines
500 B
JavaScript
13 lines
500 B
JavaScript
const path = require('path');
|
|
const fs = require('fs');
|
|
const appVersion = require('./package.json').version;
|
|
const versionFilePath = path.join(__dirname + '/src/environments/version.ts');
|
|
const versionStr = `export const VERSION = '${appVersion}';`;
|
|
fs.writeFile(versionFilePath, versionStr, { flat: 'w' }, function (err) {
|
|
if (err) {
|
|
return console.log(err);
|
|
}
|
|
console.log(`Updating application version ${appVersion}`);
|
|
console.log(`${'Writing version module to '}${versionFilePath}\n`);
|
|
});
|