Skip to content

Commit

Permalink
feat: added version.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kjxbyz committed Jul 11, 2024
1 parent dae0554 commit 3ab428c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { globSync } from "glob";
import { createHash, type HashOptions } from "crypto";
import { createHash, type HashOptions } from "node:crypto";
import {
createReadStream,
writeFileSync,
readFileSync,
type PathOrFileDescriptor,
type WriteFileOptions,
type ObjectEncodingOptions,
} from "fs";
} from "node:fs";

export type HashFileTuple = [string, string];
export type HashFileVerifiedTuple = [string, boolean];
Expand Down
5 changes: 5 additions & 0 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as pkgInfo from "../package.json";

export const version = pkgInfo.version;

export default version;
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const options: Options = {
export default defineConfig([
{
...options,
entry: ["src/cli.ts"],
entry: ["src/cli.ts", "src/version.ts"],
dts: false,
noExternal: ["cac"],
},
Expand Down

0 comments on commit 3ab428c

Please sign in to comment.