feat: export core version in package

This commit is contained in:
2024-01-12 10:47:53 +01:00
committed by Rainer Killinger
parent 65bc9a76b6
commit 8667603bd6
5 changed files with 19 additions and 13 deletions

View File

@@ -76,15 +76,6 @@
"typedoc": "0.24.8",
"typescript": "5.1.6"
},
"tsup": {
"entry": [
"src/index.ts"
],
"sourcemap": true,
"clean": true,
"format": "esm",
"outDir": "lib"
},
"prettier": "@openstapps/prettier-config",
"eslintConfig": {
"extends": [

View File

@@ -1,3 +1,5 @@
export const CORE_VERSION = process.env.CORE_VERSION!;
export * from './guards.js';
export * from './meta.js';
export * from './translator.js';

View File

@@ -0,0 +1,13 @@
import {defineConfig} from 'tsup';
import packageJson from './package.json' assert {type: 'json'};
export default defineConfig({
entry: ['src/index.ts'],
sourcemap: true,
clean: true,
format: 'esm',
outDir: 'lib',
env: {
CORE_VERSION: packageJson.version,
},
});