Skip to content

Commit 984343e

Browse files
committed
feat: 增加了版本号的导出
1 parent 1185062 commit 984343e

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

src/const.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const version = process.env.PKG_VERSION;

src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from './const';
12
export * from './normalize-error';
23
export * from './try-sync-flatten';
34
export * from './try-callback-flatten';

src/types/env.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
declare module 'process' {
2+
interface ProcessEnv {
3+
// package name
4+
PKG_NAME: string;
5+
6+
// package version
7+
PKG_VERSION: string;
8+
}
9+
}

0 commit comments

Comments
 (0)