forked from bldrs-ai/Share
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify type assertion for JSON import (bldrs-ai#194)
* Specify type assertion for JSON import * bldrs/Share#194: Ensure all project JS files are checked by linter * bldrs/Share#194: Add ESLint plugin (and configuration) for import assertions * bldrs/Share#194: Fix lint errors in version generation logic
- Loading branch information
1 parent
f0b8024
commit f50784b
Showing
4 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { execSync} from 'child_process'; | ||
import PkgInfo from '../../package.json'; | ||
import {execSync} from 'child_process' | ||
import PkgInfo from '../../package.json' assert {type: "json"} | ||
|
||
// https://stackoverflow.com/questions/24663175/how-can-i-inject-a-build-number-with-webpack | ||
const __versionString__ = execSync('git rev-list HEAD --count').toString().trim(); | ||
const __versionString__ = execSync('git rev-list HEAD --count').toString().trim() | ||
const version = PkgInfo.version.toString().replace(/-.*/, '') | ||
PkgInfo.version = `${version}-r${__versionString__}`; | ||
const PkgInfoStr = JSON.stringify(PkgInfo, null, ' '); | ||
console.log(PkgInfoStr); | ||
|
||
PkgInfo.version = `${version}-r${__versionString__}` | ||
const PkgInfoStr = JSON.stringify(PkgInfo, null, ' ') | ||
|
||
console.log(PkgInfoStr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters