Wondering what’s next for npm?Check out our public roadmap! »

@neutrinojs/clean

9.0.0-rc.0 • Public • Published

Neutrino Clean Middleware

@neutrinojs/clean is Neutrino middleware for removing directories before building.

NPM version NPM downloads

Requirements

  • Node.js ^8.10 or 10+
  • Yarn v1.2.1+, or npm v5.4+
  • Neutrino 9
  • webpack 4

Installation

@neutrinojs/clean can be installed via the Yarn or npm clients.

Yarn

❯ yarn add --dev @neutrinojs/clean

npm

❯ npm install --save-dev @neutrinojs/clean

Usage

@neutrinojs/clean can be consumed from the Neutrino API, middleware, or presets. Require this package and plug it into Neutrino:

// Using function middleware format
const clean = require('@neutrinojs/clean');
 
// Use with default options
neutrino.use(clean);
 
// Usage shows the default values of this middleware:
neutrino.use(clean, {
  paths: [],
  root: neutrino.options.root,
  verbose: neutrino.options.debug,
  // Override pluginId to add an additional clean plugin instance
  pluginId: 'clean'
});
// Using object or array middleware format
 
// Use with default options
module.exports = {
  use: ['@neutrinojs/clean']
};
 
// Usage shows the default values of this middleware:
module.exports = {
  use: [
    ['@neutrinojs/clean', {
      paths: [],
      root: neutrino.options.root,
      verbose: neutrino.options.debug,
      // Override pluginId to add an additional banner plugin instance
      pluginId: 'clean'
    }]
  ]
};

Customization

@neutrinojs/clean creates some conventions to make overriding the configuration easier once you are ready to make changes.

Plugins

The following is a list of plugins and their identifiers which can be overridden:

Name Description NODE_ENV
clean Removes directories before building. all

Contributing

This middleware is part of the neutrino repository, a monorepo containing all resources for developing Neutrino and its core presets and middleware. Follow the contributing guide for details.

Install

npm i @neutrinojs/[email protected]

Version

9.0.0-rc.0

License

MPL-2.0

Unpacked Size

3.4 kB

Total Files

3

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar