New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

yaup

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaup

A more advanced CLI for esbuild

latest
npmnpm
Version
1.8.0
Version published
Weekly downloads
141
51.61%
Maintainers
1
Weekly downloads
 
Created
Source

💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.

yaup

npm version

Why this over other esbuild/rollup wrappers?

  • Unopinionated: close to raw esbuild, flexible configration
  • Minimal: minimal API interface so it's easier to maintain

Install

npm i yaup -D

Usage

It's common to publish dual CommonJS/ES module packages with an extra TypeScript declaration file, all you need is creating a yaup.config.ts:

import { defineConfig } from 'yaup'

export default defineConfig({
  input: './src/index.ts',
  output: [
    {
      format: 'esm',
      dir: 'dist/esm',
    },
    {
      format: 'cjs',
      dir: 'dist/cjs',
    },
    {
      format: 'dts',
      dir: 'dist/types',
    },
  ],
})

Run yaup in this directory, it will emit:

  • dist/esm/index.js
  • dist/cjs/index.js
  • dist/types/index.d.ts

Then, configure package.json accordingly:

{
  "main": "./dist/cjs/index.js",
  "module": "./dist/esm/index.js",
  "types": "./dist/types/index.js",
  "exports": {
    ".": {
      "import": "./dist/esm/index.js",
      "default": "./dist/cjs/index.js"
    }
  }
}

API

Full config reference.

Contributing

Bug fixes are welcome, I'm not accepting new features unless it's absolutely necessary.

License

MIT © EGOIST

FAQs

Package last updated on 19 Nov 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