Skip to content

Commit 0f5cd24

Browse files
committed
use pkg for type
1 parent fca1f3b commit 0f5cd24

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/BareServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ export class BareError extends Error {
2424
}
2525
}
2626

27-
const pkg = JSON.parse(
27+
export const pkg = JSON.parse(
2828
readFileSync(join(__dirname, '..', 'package.json'), 'utf-8')
2929
) as { version: string };
3030

31-
export const project: BareProject = {
31+
const project: BareProject = {
3232
name: 'bare-server-node',
3333
description: 'TOMPHTTP NodeJS Bare Server',
3434
repository: 'https://github.com/tomphttp/bare-server-node',

src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import './sourceMap.js';
2-
import { project } from './BareServer.js';
2+
import { pkg } from './BareServer.js';
33
import createBareServer from './createServer.js';
44
import { Command } from 'commander';
55
import { config } from 'dotenv';
@@ -11,7 +11,7 @@ const program = new Command();
1111

1212
program
1313
.alias('server')
14-
.version(project.version)
14+
.version(pkg.version)
1515
.option('-d, --directory <directory>', 'Bare directory', '/')
1616
.option('-h, --host <host>', 'Listening host', process.env.HOST || '0.0.0.0')
1717
.option<number>(

0 commit comments

Comments
 (0)