🚀 DAY 2 OF LAUNCH WEEK: Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies.Learn more →
Socket
Book a DemoInstallSign in
Socket

@bigtest/parcel

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bigtest/parcel

Effection wrappers for working with parcel

latest
Source
npmnpm
Version
0.5.2
Version published
Maintainers
1
Created
Source

@bigtest/parcel

Control a parcel worker farm with visibility into key work events.

When parcel is running, it starts up a bunch of processes to do the actual work of compilation and bundling in parallel. This is what we want, but because of the way its implemented, it is possible that if shutdown happens too quickly, or while it is in the middle of a bundle, then it can leave a bunch of processes hanging around.

This solves the problem by wrapping an effection resource around a parcel process and killing it off, and all children whenever it passes out of scope.

Also, it isn't enough just to be running parcel, we have to know that it is up and running, and when new builds are available. For this, the parcel process implements the receive() method to get messages about when a new build is available.

Synopsis

import { ParcelProcess } from '@bigtest/parcel';

function* start() {

  // this operation does not complete until parcel is up and running
  let parcel: ParcelProcess = yield ParcelProcess.create({
    buildDir: './build',
    srcPath: './tests/*.test.{js,ts}'
  });

  while (true) {
    let message = yield parcel.receive({ type: "update" });
    console.log('new build happened: ', message);
  }
}

Development

$ yarn start

Testing

$ yarn test

FAQs

Package last updated on 06 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts