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

neutrino-patch

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

neutrino-patch

Simple patched methods for neutrino

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
48
increased by6.67%
Maintainers
1
Weekly downloads
 
Created
Source

Neutrino Patch

Adds simple methods to Neutrino to make managing configuration easier.

Install dependency

npm install --save neutrino-patch

Usage

const applyNeutrinoPatches = require('neutrino-patch');

const myMiddleware = () => (neutrino) => {
  applyNeutrinoPatches(neutrino);

  // adds extensions 'abc' and 'xyz' at end of list (lowest priority)
  neutrino.addSupportedExtensions('abc', 'xyz');

  // adds extensions 'yay' and 'woo' immediately before 'js' (higher priority)
  // (or at end of list if 'js' is not found)
  neutrino.addSupportedExtensionsBefore('js', 'yay', 'woo');

  // add a preset to the babel compile stage
  // (whether it has already been defined or not)
  neutrino.tapAtEnd('compile', 'babel', (options) => {
    options.presets.push(['@babel/some-preset-here', {}]);
    return options;
  });
};

Keywords

FAQs

Package last updated on 29 Aug 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

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