File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import type { PackageJson } from "pkg-types" ;
2
+ import { readPackageJSON } from "pkg-types" ;
2
3
import { defu } from "defu" ;
3
4
4
5
export async function getPkg ( dir : string , input : Record < string , string > = { } ) {
5
- const { readPackageJSON } = await import ( "pkg-types" ) ;
6
6
const pkg = await readPackageJSON ( dir ) . catch ( ( ) => undefined ) ;
7
7
return defu (
8
8
{
Original file line number Diff line number Diff line change
1
+ import { existsSync , promises as fsp } from "node:fs" ;
1
2
import type { Config , ResolvedConfig } from "./config" ;
2
3
import { TransformResult , transform } from "./transform" ;
4
+ import { loadConfig } from "./config" ;
3
5
4
6
export interface AutomdResult extends TransformResult {
5
7
config : ResolvedConfig ;
6
8
}
7
9
8
10
export async function automd ( _config : Config = { } ) : Promise < AutomdResult > {
9
- const { existsSync, promises : fsp } = await import ( "node:fs" ) ;
10
- const { loadConfig } = await import ( "./config" ) ;
11
11
const config = await loadConfig ( _config . dir , _config ) ;
12
12
13
13
if ( ! existsSync ( config . input ) ) {
You can’t perform that action at this time.
0 commit comments