File tree Expand file tree Collapse file tree 4 files changed +22
-17
lines changed Expand file tree Collapse file tree 4 files changed +22
-17
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " ../../tsconfig.json" ,
3
3
"compilerOptions" : {
4
- "rootDir" : " ./src" ,
5
4
"outDir" : " ./dist"
6
5
},
7
6
"include" : [
8
- " src/**/*.ts"
7
+ " ./ src/**/*.ts"
9
8
],
10
9
"exclude" : [
11
10
" node_modules" ,
Original file line number Diff line number Diff line change 1
- import fs from 'node:fs/promises '
2
- import dts from '../ bun-plugin/src/index '
1
+ import process from 'node:process '
2
+ import dts from 'bun-plugin-dtsx '
3
3
4
4
console . log ( 'Building...' )
5
5
6
- await fs . rm ( './dist' , { recursive : true , force : true } )
7
-
8
- await Bun . build ( {
9
- entrypoints : [ './src/index.ts' , './bin/cli.ts' ] ,
10
- outdir : './dist' ,
11
- format : 'esm' ,
6
+ const result = await Bun . build ( {
7
+ entrypoints : [ 'src/index.ts' ] ,
8
+ outdir : 'dist' ,
12
9
target : 'bun' ,
13
- minify : true ,
14
- plugins : [
15
- dts ( ) ,
16
- ] ,
10
+ external : [ '@stacksjs/dtsx' ] ,
11
+ // minify: true,
12
+ plugins : [ dts ( ) ] ,
17
13
} )
18
14
19
- console . log ( 'Built!' )
15
+ if ( ! result . success ) {
16
+ console . error ( 'Build failed' )
17
+
18
+ for ( const message of result . logs ) {
19
+ console . error ( message )
20
+ }
21
+
22
+ process . exit ( 1 )
23
+ }
24
+
25
+ console . log ( 'Build complete' )
Original file line number Diff line number Diff line change
1
+ export const wip = true
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " ../../tsconfig.json" ,
3
3
"compilerOptions" : {
4
- "rootDir" : " ./src" ,
5
4
"outDir" : " ./dist"
6
5
},
7
6
"include" : [
8
- " src/**/*.ts"
7
+ " ./ src/**/*.ts"
9
8
],
10
9
"exclude" : [
11
10
" node_modules" ,
You can’t perform that action at this time.
0 commit comments