1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2025-01-04 00:08:46 +00:00
code-server-2/src/node/constants.ts
2020-10-26 17:56:12 -05:00

14 lines
374 B
TypeScript

import { logger } from "@coder/logger"
import * as path from "path"
let pkg: { version?: string; commit?: string } = {}
try {
pkg = require("../../package.json")
} catch (error) {
logger.warn(error.message)
}
export const version = pkg.version || "development"
export const commit = pkg.commit || "development"
export const rootPath = path.resolve(__dirname, "../..")