@@ -16,25 +16,25 @@ const merge = require('merge-stream');
1616const { readDirDeepSync } = require ( 'read-dir-deep' ) ;
1717
1818gulp . task ( 'build' , ( ) => {
19- const gpu = browserify ( './src/browser.js' , { standalone : 'GPU' } )
19+ const gpu = browserify ( './src/browser.js' , { standalone : 'GPU' , browserField : false } )
2020 . ignore ( 'gl' )
2121 . bundle ( )
2222 . pipe ( source ( 'gpu-browser.js' ) )
2323 . pipe ( buffer ( ) )
2424 . pipe ( stripComments ( ) )
2525 . pipe ( header ( fs . readFileSync ( './src/browser-header.txt' , 'utf8' ) , { pkg : pkg } ) )
26- . pipe ( gulp . dest ( 'dist' ) )
26+ . pipe ( gulp . dest ( './ dist' ) )
2727 . on ( 'error' , console . error ) ;
2828
29- const gpuCore = browserify ( './src/browser.js' , { standalone : 'GPU' } )
29+ const gpuCore = browserify ( './src/browser.js' , { standalone : 'GPU' , browserField : false } )
3030 . ignore ( 'gl' )
3131 . ignore ( 'acorn' )
3232 . bundle ( )
3333 . pipe ( source ( 'gpu-browser-core.js' ) )
3434 . pipe ( buffer ( ) )
3535 . pipe ( stripComments ( ) )
3636 . pipe ( header ( fs . readFileSync ( './src/browser-header.txt' , 'utf8' ) , { pkg : pkg } ) )
37- . pipe ( gulp . dest ( 'dist' ) )
37+ . pipe ( gulp . dest ( './ dist' ) )
3838 . on ( 'error' , console . error ) ;
3939
4040 return merge ( gpu , gpuCore ) ;
@@ -46,14 +46,14 @@ gulp.task('minify', () => {
4646 . pipe ( uglify ( ) )
4747 . pipe ( rename ( 'gpu-browser.min.js' ) )
4848 . pipe ( header ( fs . readFileSync ( './src/browser-header.txt' , 'utf8' ) , { pkg : pkg } ) )
49- . pipe ( gulp . dest ( 'dist' ) )
49+ . pipe ( gulp . dest ( './ dist' ) )
5050 . on ( 'error' , console . error ) ;
5151
5252 const gpuCore = gulp . src ( 'dist/gpu-browser-core.js' )
5353 . pipe ( uglify ( ) )
5454 . pipe ( rename ( 'gpu-browser-core.min.js' ) )
5555 . pipe ( header ( fs . readFileSync ( './src/browser-header.txt' , 'utf8' ) , { pkg : pkg } ) )
56- . pipe ( gulp . dest ( 'dist' ) )
56+ . pipe ( gulp . dest ( './ dist' ) )
5757 . on ( 'error' , console . error ) ;
5858
5959 return merge ( gpu , gpuCore ) ;
@@ -74,7 +74,7 @@ gulp.task('bsync', () => {
7474 } ) ;
7575
7676 // Detect change -> rebuild TS
77- gulp . watch ( [ 'src/**.js' ] , [ 'minify' ] ) ;
77+ gulp . watch ( [ 'src/**.js' ] , gulp . series ( 'minify' ) ) ;
7878} ) ;
7979
8080/// Auto rebuild and host
0 commit comments