threads

v1.7.0
Web workers & worker threads as simple as a function call
thread worker pool spawn isomorphic parallel observable worker_threads

clean

rimraf dist/ dist-esm/

dev

npm run clean && tsc -p tsconfig.json --watch

build

npm run clean && npm run build:cjs && npm run build:es

build:cjs

tsc -p tsconfig.json

build:es

tsc -p tsconfig-esm.json

postbuild

npm run bundle

bundle

rollup -c -f umd --file=bundle/worker.js --name=threads --silent -- dist-esm/worker/bundle-entry.js

test

npm run test:library && npm run test:tooling && npm run test:puppeteer:basic && npm run test:puppeteer:webpack

test:library

cross-env TS_NODE_FILES=true ava ./test/**/*.test.ts

test:tooling

cross-env TS_NODE_FILES=true ava ./test-tooling/**/*.test.ts

test:puppeteer:basic

puppet-run --plugin=mocha --bundle=./test/workers/:workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts

test:puppeteer:webpack

puppet-run --serve ./test-tooling/webpack/dist/app.web/0.worker.js --serve ./test-tooling/webpack/dist/app.web/1.worker.js --plugin=mocha ./test-tooling/webpack/webpack.chromium.mocha.ts

posttest

tslint --project .

prepare

npm run build
npm i threads

Metadata

  • MIT
  • Whatever
  • Andy Wermke
  • released 9/25/2021

Downloads

Maintainers