New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fuse-box-node-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fuse-box-node-plugin

a cli tool to reduce your docker-compose overhead

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

fuse-box-node-plugin

semantic-release Build Status GitHub issues devDependencies Status dependencies Status

Plugin for fuse-box to allow inclusion of .node binaries and related dependencies

Usage

Install via npm i fuse-box-node-plugin --save-dev.

Configuration

NodePlugin follows the factorization and configuration pattern of official fuse-box plugins.

Including const {NodePlugin} = require("fuse-box-node-plugin"); will return a factory function, which accepts an options literal in the following format:

interface NodePluginOptions {
    // file path to the .node file
    file: string;

    // a root folder to be used when copying over, defaults to file's dirname
    root?: string;

    // output folder for NodePlugin assets. defaults to "modules"
    moduleFolder?: string

    // defaults to file's basename, defines subfolder in moduleFolder
    identifier?: string;

    // a list of globs relative root-folder, matching files will be copied into the bundle
    relativeDependencies?: string[];
}

Examples

Usage with sharp

The sharp-package creates platform specific files during npm's prebuild-step.

  • a native node module sharp.node in node_modules/sharp/Build/Release/
  • a few dozen library files in node_modules/sharp/vendor/

sharp.node requires most of these files, depending on features used in your code, and looks for them relative to itself.

To include sharp in your fuse-box bundle add NodePlugin to your plugin configuration:

plugins: [
  NodePlugin({
      file: "node_modules/sharp/build/Release/sharp.node",
      root: "node_modules/sharp",
      relativeDependencies: ["**.dll", "vendor/**"]
  })
]

This will generate a modules/sharp/ directory in your configured output, which mirrors the tree structure of node_modules/sharp for all files matching relativeDependencies.

Keywords

FAQs

Package last updated on 15 Aug 2018

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