Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ahjs/worker-bundler

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ahjs/worker-bundler

Make a worker bundle from a Node.js package.

  • 0.0.7
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ahjs-worker-bundler

Make a worker bundle from a Node.js package.

How to use

Run this tool from a directory containing package.json. Ideally, it should be installed as a dev dependency and set as a script. For simplicity, all configuration for the bundle is derived from package.json values, mostly using standard fields:

// NOTE: Comments are not actually valid in JSON.
{
  // Recommended to avoid accidentally publishing as a real npm package.
  "private": true,
  "files": [
    // What files to include into the bundle, including the script files mentioned in "bin"/"directories.bin".
    "**/*.js"
  ],
  // If this is set, it must be a object mapping job types to the script that should be invoked to process their jobs.
  // NOTE: If this is set, "directories.bin" cannot be set.
  "bin": {
    "jobTypeA": "path/to/handlerA.js",
    "jobTypeB": "path/to/handlerB.js"
  },
  "directories": {
    // If this is set, it is assumed that handlers are located at ${bin}/${jobType}.js.
    // NOTE: If this is set, "bin" cannot be set.
    "bin": "path/to/handlers/folder"
  },
  "engines": {
    // If this is set, the Node.js version bundled will be compatible with this range.
    "node": ">= 16 < 18.3"
  },
  "scripts": {
    "build-bundle": "ahjs-wb"
  },
  "dependencies": {
    // Any dependencies here will be installed in a Linux Docker container and bundled.
    // NOTE: Other dependency types are not installed e.g. devDependencies, peerDependencies.
  },
  "devDependencies": {
    // Replace asterisk with specific version range.
    "@ahjs/worker-bundler": "*"
  }
}

All other fields are ignored, so they can be used for other purposes.

The output file will be ahjs-worker.tar.gz.

FAQs

Package last updated on 25 May 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc