File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import { log } from '@stacksjs/cli'
2- import { fs } from '@stacksjs/storage'
32import { dts } from 'bun-plugin-dtsx'
3+ import fs from 'node:fs/promises'
44
55log . info ( 'Building...' )
66
@@ -16,9 +16,9 @@ await Bun.build({
1616} )
1717
1818// prepare dist for publishing
19- await fs . move ( './dist/bin/cli.js' , './dist/cli.js' )
20- await fs . move ( './dist/src/index.js' , './dist/index.js' )
21- await fs . remove ( './dist/src' )
22- await fs . remove ( './dist/bin' )
19+ await fs . rename ( './dist/bin/cli.js' , './dist/cli.js' )
20+ await fs . rename ( './dist/src/index.js' , './dist/index.js' )
21+ await fs . rm ( './dist/src' , { recursive : true , force : true } )
22+ await fs . rm ( './dist/bin' , { recursive : true , force : true } )
2323
2424log . success ( 'Built' )
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export async function generateDeclarationsFromFiles(options?: DtsGenerationConfi
5252 if ( fileDeclarations ) {
5353 const relativePath = relative ( options ?. root ?? './src' , file )
5454 const parsedPath = parse ( relativePath )
55- const outputPath = join ( options ?. outdir ?? './dist' , `${ parsedPath . name } .d.ts` )
55+ const outputPath = join ( options ?. outdir ?? './dist' , parsedPath . dir , `${ parsedPath . name } .d.ts` )
5656
5757 await mkdir ( dirname ( outputPath ) , { recursive : true } ) // Ensure the directory exists
5858 await writeToFile ( outputPath , fileDeclarations ) // Write the declarations without additional formatting
You can’t perform that action at this time.
0 commit comments