
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
esbuild-plugin-clean
Advanced tools
ESBuild plugin for cleaning up output/assets before building.
npm install esbuild-plugin-clean --save-dev
pnpm install esbuild-plugin-clean --save-dev
yarn add esbuild-plugin-clean --save-dev
import { build } from 'esbuild';
import { clean } from 'esbuild-plugin-clean';
(async () => {
const res = await build({
entryPoints: ['./demo.ts'],
bundle: true,
outfile: './dist/main.js',
plugins: [
clean({
patterns: ['./dist/*', './dist/assets/*.map.js'],
cleanOnStartPatterns: ['./prepare'],
cleanOnEndPatterns: ['./post'],
}),
],
});
})();
This plugin use del under the hood, so you can easily pass del options to this plugin.
export interface CleanOptions {
/**
* file clean patterns (passed to `del`)
*
* @default: []
*/
patterns?: string | string[];
/**
* file clean patterns(in onStart only) (passed to `del`)
*
* @default: []
*/
cleanOnStartPatterns?: string | string[];
/**
* file clean patterns(in onEnd only) (passed to `del`)
*
* @default: []
*/
cleanOnEndPatterns?: string | string[];
/**
* use dry-run mode to see what's going to happen
*
* this option will enable verbose option automatically
*
* @default: false
*/
dryRun?: boolean;
/**
* extra options passed to `del`
*
* @default {}
*/
options?: DelOptions;
/**
* execute clean sync or async (use `del` or `del.sync` for cleaning up)
*
* @default: true
*/
sync?: boolean;
/**
* do cleaning in start / end / both
* maybe in some strange cases you will need it ? :P
*
* @default: "start"
*/
cleanOn?: 'start' | 'end' | 'both';
/**
* enable verbose logging to see what's happening
*
* @default false
*/
verbose?: boolean;
}
FAQs
ESBuild plugin for cleaning up assets before building.
The npm package esbuild-plugin-clean receives a total of 13,956 weekly downloads. As such, esbuild-plugin-clean popularity was classified as popular.
We found that esbuild-plugin-clean demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.