@terminal-nerds/tsup-config
v0.8.1
Published
Terminal Nerds extendable configuration for tsup.
Downloads
17
Readme
@terminal-nerds/tsup-config
➡️ Extendable tsup configuration, part of the terminal-nerds/configs project.
Prerequisites
ℹ️ This configuration package require these tools to use locally on your device(s):
Basic usage
👣 Follow the steps below:
Install it with the Node.js package manager of your choice (in our case, we use pnpm).
pnpm install --save-dev tsup @terminal-nerds/tsup-config
Create a tsup configuration file -
tsup.config.ts
.Use a specific [configuration target], and use it.\
import { defineConfig } from "tsup"; import { getOptions } from "@terminal-nerds/tsup-config"; export default defineConfig((options) => ({ ...getOptions("universal", options), entry: ["./source/**/*.ts"], }));
📖 For the tsup CLI usage, please refer to its documentation.
Available targets
| Name | Purpose |
| ----------- | ------------------------------------------------------------------------- |
| browser
| For building a package, which will be used only in browser |
| cjs
| For building a Node.js package in CommonJS format |
| esm
| For building a Node.js package in ES Modules format |
| universal
| For building a Node.js package in both CommonJS and ES Modules format |
Security
🔐 For more information, please refer to the Security section at the root of the terminal-nerds/configs monorepo.
Contributing
🤝 Contributions of any kind are welcome!
Please refer to the monorepo (terminal-nerds/configs) project's CONTRIBUTING file for more information if you wish to get involved.
License
⚖️ For more information, please refer to the License section at the root of the terminal-nerds/configs monorepo.