@metalsmith/remove

    1.1.1 • Public • Published

    @metalsmith/remove

    A Metalsmith plugin to remove files from the build

    metalsmith: core plugin npm: version ci: build code coverage license: MIT

    Use @metalsmith/remove to discard files from the build output after their metadata and contents have been read and used by plugins. While Metalsmith#ignore ignores the matched files completely, @metalsmith/remove only removes them at the point the plugin is use'd.

    Installation

    NPM:

    npm install @metalsmith/remove

    Yarn:

    yarn add @metalsmith/remove

    Usage

    Pass the plugin with options to Metalsmith#use:

    var remove = require('@metalsmith/remove')
    
    metalsmith.use(remove('drafts/*')) // single pattern
    metalsmith.use(remove(['drafts/*', 'unfinished/*'])) // multiple patterns

    Debug

    To enable debug logs, set the DEBUG environment variable to @metalsmith/remove:

    Linux/Mac:

    DEBUG=@metalsmith/remove

    Windows:

    set "DEBUG=@metalsmith/remove"

    CLI Usage

    To use this plugin with the Metalsmith CLI, add @metalsmith/remove to the plugins key in your metalsmith.json file:

    {
      "plugins": [{ "@metalsmith/remove": "drafts/*" }]
    }

    But you can also pass an array of patterns to ignore:

    {
      "plugins": [{ "@metalsmith/remove": ["drafts/*", "unfinished/*"] }]
    }

    License

    MIT

    Install

    npm i @metalsmith/remove

    DownloadsWeekly Downloads

    6

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    9.44 kB

    Total Files

    5

    Last publish

    Collaborators

    • webketje
    • ismay
    • woodyrew