Skip to content

Commit

Permalink
fix: reformat _version.ts output file for tslint (#17)
Browse files Browse the repository at this point in the history
- Properties should be separated by semicolonstslint(semicolon) - on TsAppVersion Interface
- file should end with a newlinetslint(eofline)
  • Loading branch information
dzoccarato authored Mar 28, 2020
1 parent 061ba68 commit 1233a6e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ const appVersion = require(packageFile).version;

console.log('[TsAppVersion] ' + colors.green('Application version (from package.json): ') + colors.yellow(appVersion));
let src = `interface TsAppVersion {
version: string,
versionLong?: string,
versionDate: string,
gitCommitHash?: string,
gitCommitDate?: string,
gitTag?: string,
version: string;
versionLong?: string;
versionDate: string;
gitCommitHash?: string;
gitCommitDate?: string;
gitTag?: string;
}
const obj: TsAppVersion = {
version: '${appVersion}',
Expand Down Expand Up @@ -121,7 +121,8 @@ if (enableGit) {
}
}

src += `export default obj;`;
src += `export default obj;
`;

console.log('[TsAppVersion] ' + colors.green('Writing version module to ') + colors.yellow(versionFile));
fs.writeFile(versionFile, src, function (err) {
Expand Down

0 comments on commit 1233a6e

Please sign in to comment.