Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-plugin-ignoretests

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-ignoretests

ESBuild plugin to ignore test files

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
171
increased by612.5%
Maintainers
1
Weekly downloads
 
Created
Source

Turborepo template codecov Version Downloads Unit Tests npm bundle size

ESBuild plugin to ignore/exclude test files from build.

While building large libraries, we follow convention similar to chakraui -> component and corresponding tests for the component live in the same dedicated folder. In this scenario, tsup will build and include test file as well in the final build output. This is not desirable. This plugin will easily ignore test files from build process. You can also pass in custom regexp to ignore other files based on path.

Compatibility

  • JavaScript/TypeScript React libraries using tsup or other builders based on esbuild

This plugin seamlessly integrates with tsup and any other builders based on esbuild.

Install

$ pnpm add esbuild-plugin-ignoretests
# or
$ npm install esbuild-plugin-ignoretests
# or
$ yarn add esbuild-plugin-ignoretests

Usage

// tsup.config.ts or tsup.config.js
import { defineConfig } from "tsup";
import ignoretestsPlugin from "esbuild-plugin-ignoretests";

export default defineConfig(options => ({
    ...
    esbuildPlugins:[ignoretestsPlugin()]
}));

optionally you can also pass custom regular expression.

export default defineConfig(options => ({
    ...
    esbuildPlugins:[ignoretestsPlugin({ customRegExp: /my-reg-exp/ })]
}));

🤩 Don't forger to start this repo!

Want handson course for getting started with Turborepo? Check out React and Next.js with TypeScript

License

Licensed as MIT open source.


with 💖 by Mayank Kumar Chaudhari

Keywords

FAQs

Package last updated on 23 Sep 2023

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