File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
import esbuild from 'esbuild' ;
2
2
import { readFile } from 'fs/promises' ;
3
+ import minimist from 'minimist' ;
4
+
5
+ const argv = minimist ( process . argv . slice ( 2 ) ) ;
3
6
4
7
const readJson = async ( path ) =>
5
8
JSON . parse ( await readFile ( new URL ( path , import . meta. url ) ) ) ;
@@ -46,6 +49,7 @@ async function build() {
46
49
platform : 'node' ,
47
50
logLevel : 'info' ,
48
51
plugins : [ preactCompatPlugin ] ,
52
+ watch : argv . watch ,
49
53
external,
50
54
outdir,
51
55
...options ,
Original file line number Diff line number Diff line change 37
37
"babel-loader" : " 8.2.3" ,
38
38
"core-js" : " 3.21.0" ,
39
39
"esbuild" : " 0.14.21" ,
40
+ "minimist" : " 1.2.5" ,
40
41
"react" : " 17.0.2"
41
42
},
42
43
"scripts" : {
43
44
"dev" : " tsc --watch --preserveWatchOutput" ,
44
45
"build" : " node bin/build.mjs" ,
46
+ "watch" : " npm run build -- --watch" ,
45
47
"test" : " echo 'No tests' && exit 0" ,
46
48
"clean" : " rm -r esm dist" ,
47
49
"prepublishOnly" : " npm run build" ,
You can’t perform that action at this time.
0 commit comments