@@ -25,18 +25,18 @@ const runBrowserify = (files) => new Promise((resolve /* , reject */) => {
2525const writeFileExtra = ( opts ) => async ( fname , fbody ) => {
2626 await fs . promises . writeFile ( fname , fbody ) ;
2727 if ( opts . verbose ) {
28- console . log ( fname , fbody . length ) ; // eslint-disable-line no-console
28+ console . log ( ' ' , path . basename ( fname ) , fbody . length ) ; // eslint-disable-line no-console
2929 }
3030 return fbody ;
3131} ;
3232
3333const run = async ( opts ) => {
34- if ( opts . verbose ) {
35- console . log ( 'run' ) ; // eslint-disable-line no-console
36- }
3734
3835 const wfe = writeFileExtra ( opts ) ;
3936
37+ if ( opts . verbose ) {
38+ console . log ( '' ) ; // eslint-disable-line no-console
39+ }
4040 const workerCode = await wfe ( './vcdrom-worker.js' ,
4141 await runBrowserify ( './lib/vcdrom-worker.js' ) ) ;
4242
@@ -51,6 +51,9 @@ const run = async (opts) => {
5151
5252 await wfe ( './vcdrom.min.js' ,
5353 ( await terser . minify ( mainCode , { compress : { } } ) ) . code ) ;
54+ if ( opts . verbose ) {
55+ console . log ( '--------------------------------' ) ; // eslint-disable-line no-console
56+ }
5457} ;
5558
5659const build = async ( ) => {
@@ -66,7 +69,7 @@ const build = async () => {
6669 await run ( opts ) ;
6770
6871 if ( opts . watch ) {
69- const fullWatchPoints = [ './lib/' , './build.js' ] . map ( p => path . resolve ( p ) ) ;
72+ const fullWatchPoints = [ './lib/' ] . map ( p => path . resolve ( p ) ) ;
7073 const watcher = chokidar . watch ( fullWatchPoints , {
7174 ignored : / ( ^ | [ / \\ ] ) \. ./ , // ignore dotfiles
7275 persistent : true
0 commit comments