aboutsummaryrefslogtreecommitdiff
path: root/lib/version.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/version.ts')
-rw-r--r--lib/version.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/version.ts b/lib/version.ts
new file mode 100644
index 0000000..e8322e3
--- /dev/null
+++ b/lib/version.ts
@@ -0,0 +1,12 @@
+import pkg from '@hollowdark/package.json'
+
+const [major, minor] = pkg.version.split('.')
+
+/**
+ * The app's version in short display form (`<major>.<minor>`), derived from
+ * the `version` field in `package.json`. Displayed in the UI footer.
+ */
+export const APP_VERSION: string = `${major}.${minor}`
+
+/** The full semver string from `package.json`. */
+export const APP_VERSION_FULL: string = pkg.version