2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-03 23:15:24 +00:00
RTL/prebuild.js
ShahanaFarooqui 0d3ff90977 Merging Angular pre-build code
Merging Angular pre-build code
2019-03-18 20:13:01 -04:00

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`);
});