Get version for Taskfile from version.js (#49)

Make version.js runnable to output the current version, get the VERSION variable in the Taskfile from this script.
This commit is contained in:
Evan Simkowitz 2024-06-13 18:11:21 -07:00 committed by GitHub
parent 3ec62fd6d2
commit 514500bb72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -6,7 +6,8 @@ version: "3"
vars:
APP_NAME: "NextWave"
BIN_DIR: "bin"
VERSION: "0.1.0"
VERSION:
sh: node version.cjs
tasks:
generate:

View File

@ -3,3 +3,7 @@ const packageJson = require(path.resolve(__dirname, "package.json"));
const VERSION = `${packageJson.version}`;
module.exports = VERSION;
if (typeof require !== "undefined" && require.main === module) {
console.log(VERSION);
}