Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@open-tech-world/rollup-plugin-clean

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-tech-world/rollup-plugin-clean

A rollup plugin to remove files and folders.

Source
npmnpm
Version
0.5.0
Version published
Weekly downloads
8
-83.67%
Maintainers
1
Weekly downloads
 
Created
Source

@open-tech-world/rollup-plugin-clean

A rollup plugin to remove files and folders.

Instal

With Yarn:

yarn add --dev @open-tech-world/rollup-plugin-clean

With Npm:

npm i --save-dev @open-tech-world/rollup-plugin-clean

Usage

// rollup.config.js
import clean from '@open-tech-world/rollup-plugin-clean';

export default {
  entry: 'src/index.js',
  output: {
    file: 'bundle.js',
    format: 'cjs'
  }
  plugins: [
    clean('build/**') // Removes all files & folders inside the path.
  ]
};

API Overview

clean

A function to delete files and folders in start or end build hooks.

clean(target: string | string[] | { start: target, end: target }, options: { dryRun: boolean })

Props:

NameTypeDefaultDescription
targetString | String[] | { start, end }undefinedThe target paths to remove.
The target string matched using glob pattern.
The default hook is start when string or string array passed.
When an object is passed as target, use start or end prop to specify the target paths to clean.
optionsObjectundefinedThe options to control the behaviour of clean function.
See below table for options properties.

Options:

OptionTypeDefaultDescription
dryRunBooleanfalseFlag to disable clean function and it reports the target paths to be cleaned in the console.
silentBooleanfalseFlag to disable any outputs in the console.
Note that it will also disable any warnings in the console.

License

MIT © Thanga Ganapathy

Keywords

rollup

FAQs

Package last updated on 08 Jun 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