1.8.0 • Published 2 years ago
yaup v1.8.0
💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.
yaup
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
Contributing
Bug fixes are welcome, I'm not accepting new features unless it's absolutely necessary.
License
MIT © EGOIST
1.8.0
2 years ago
1.7.1
3 years ago
1.7.0
3 years ago
1.6.4
3 years ago
1.6.3
3 years ago
1.6.2
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.3
3 years ago
1.4.2
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.0
3 years ago
1.2.0
3 years ago
1.1.0
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago