File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11
11
"build:cjs" : " tsc -p tsconfig.json" ,
12
12
"build:es" : " tsc -p tsconfig-esm.json" ,
13
13
"postbuild" : " run-s bundle" ,
14
- "bundle" : " rollup -c -f umd --file=bundle/worker.js --name=threads --silent -- dist-esm/worker/bundle-entry .js" ,
14
+ "bundle" : " node ./rollup-script .js" ,
15
15
"test" : " run-s test:ava test:puppeteer:basic test:puppeteer:webpack" ,
16
16
"test:ava" : " cross-env TS_NODE_FILES=true ava" ,
17
17
"test:puppeteer:basic" : " puppet-run --plugin=mocha --bundle=./test/workers/:/workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts" ,
Original file line number Diff line number Diff line change
1
+ const child_process = require ( 'child_process' ) ;
2
+ const path = require ( 'path' )
3
+
4
+ if ( parseFloat ( process . version . match ( / ^ v ( \d + \. \d + ) / ) [ 1 ] ) < 10 ) {
5
+ child_process . spawnSync ( `node ${ path . resolve ( './node_modules/rollup-old/dist/bin/rollup' ) } -c -f umd --file=bundle/worker.js --name=threads -- dist-esm/worker/bundle-entry.js` , { stdio : 'inherit' } )
6
+ } else {
7
+ child_process . spawnSync ( `node ${ path . resolve ( './node_modules/rollup/dist/bin/rollup' ) } -c -f umd --file=bundle/worker.js --name=threads -- dist-esm/worker/bundle-entry.js` , { stdio : 'inherit' } )
8
+ }
You can’t perform that action at this time.
0 commit comments