File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
import chalk from 'chalk' ;
2
2
3
- // @ts -ignore
4
- import pkg from '../../../package.json' assert { type : 'json' } ;
3
+ import { name , version } from '../../package-info.cjs' ;
5
4
6
5
import type { CommandFn } from './types.mjs' ;
7
6
import { help as build } from './build.mjs' ;
@@ -12,7 +11,7 @@ import { help as preview } from './preview.mjs';
12
11
const { log } = console ;
13
12
14
13
export const helpMessage = chalk `
15
- {blue ${ pkg . name } } v${ pkg . version }
14
+ {blue ${ name } } v${ version }
16
15
17
16
The jsx-email CLI. Build, Check, Create and View email templates
18
17
Original file line number Diff line number Diff line change 1
1
import sourceMapSupport from 'source-map-support' ;
2
2
import yargs from 'yargs-parser' ;
3
3
4
- import pkg from '../../ package.json' assert { type : 'json' } ;
4
+ import { name , version } from '../package-info.cjs' ;
5
5
6
6
import { debug } from '../debug.js' ;
7
7
@@ -29,7 +29,7 @@ const run = async () => {
29
29
debug . cli ( `Command Name: \`${ commandName } \`` ) ;
30
30
31
31
if ( flags . version ) {
32
- log ( `${ pkg . name } v${ pkg . version } \n` ) ;
32
+ log ( `${ name } v${ version } \n` ) ;
33
33
return ;
34
34
}
35
35
Original file line number Diff line number Diff line change
1
+ // eslint-disable-next-line
2
+ const pkg = require ( '../package.json' ) as { name : string ; version : string } ;
3
+
4
+ export const { name, version } = pkg ;
You can’t perform that action at this time.
0 commit comments