# @choseohwan/rollup-plugin-builder-base

> base plugin builder for @choseohwan/rollup-builder

Latest version **2.0.4** (published 2022-10-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install @choseohwan/rollup-plugin-builder-base
pnpm add @choseohwan/rollup-plugin-builder-base
yarn add @choseohwan/rollup-plugin-builder-base
bun add @choseohwan/rollup-plugin-builder-base
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2022-10-09 |
| First published | 2021-10-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ChoSeoHwan |
| Maintainers | wtae1216 |
| Keywords | rollup, plugin, builder |

## Links

- npm: https://www.npmjs.com/package/@choseohwan/rollup-plugin-builder-base
- Repository: https://github.com/ChoSeoHwan/library
- Homepage: https://github.com/ChoSeoHwan/library#readme
- Issues: https://github.com/ChoSeoHwan/library/issues
- npm.io page: https://npm.io/package/@choseohwan/rollup-plugin-builder-base

## Dependencies (12)

- [@babel/core](https://npm.io/package/@babel/core.md) ^7.19.1
- [ttypescript](https://npm.io/package/ttypescript.md) ^1.5.13
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.19.0
- [@rollup/plugin-json](https://npm.io/package/@rollup/plugin-json.md) ^4.1.0
- [@rollup/plugin-babel](https://npm.io/package/@rollup/plugin-babel.md) ^5.3.1
- [rollup-plugin-terser](https://npm.io/package/rollup-plugin-terser.md) ^7.0.2
- [rollup-plugin-cleaner](https://npm.io/package/rollup-plugin-cleaner.md) ^1.0.0
- [@rollup/plugin-commonjs](https://npm.io/package/@rollup/plugin-commonjs.md) ^22.0.2
- [rollup-plugin-typescript2](https://npm.io/package/rollup-plugin-typescript2.md) ^0.34.0
- [@choseohwan/rollup-builder](https://npm.io/package/@choseohwan/rollup-builder.md) ^2.0.3
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) ^14.1.0
- [rollup-plugin-peer-deps-external](https://npm.io/package/rollup-plugin-peer-deps-external.md) ^2.2.4

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 2.0.4 (latest) — 2022-10-09
- 2.0.4-next.d645c42f722fa4dd4c6c9858569155469a888b75.0 — 2022-10-09
- 2.0.3 — 2022-09-22
- 2.0.3-next.2cc00499f4ab4b14c2e445fa495676e3c16958e9.0 — 2022-09-22
- 2.0.2 — 2022-09-22
- 2.0.2-next.c3261f7740aedc8c02aa5f2a760371c8c134ccc7.0 — 2022-09-22
- 2.0.1 — 2022-09-22
- 2.0.1-next.ddd377a5375440e1c6c72fc7e7ec779fa8aaaedc.0 — 2022-09-22
- 2.0.1-alpha-57.f665119773b026d111a262bdbe62a9d3e7c853f4.0 — 2022-09-22
- 1.1.2 — 2022-06-18
- 1.1.2-next.19b49d8d8aaf3967365fcf1b3562179a824b8876.0 — 2022-06-18
- 1.1.2-alpha-40.4ff49b20fae98d0fb5951161cb0e5aa7d9fdd0db.0 — 2022-06-18
- 1.1.1 — 2021-11-12
- 1.1.1-next.8f420769d87f13f116c3c84c5ea713e0f060496a.0 — 2021-11-12
- 1.1.1-alpha-36.db5639d6d7198e6cf9eb4898f24973990ad76be3.0 — 2021-11-12
- … 10 more at https://npm.io/package/@choseohwan/rollup-plugin-builder-base/versions

## README

# `@choseohwan/rollup-plugin-builder-base`

Base plugins builder about @choseohwan/rollup-builder 

## Install

### npm
```shell
npm install @choseohwan/rollup-plugin-builder-base @choseohwan/rollup-builder --save-dev
```

### yarn
```shell
yarn add @choseohwan/rollup-plugin-builder-base @choseohwan/rollup-builder -D
```

## Description

### List of applied plugins

- **[rollup-builder-cleaner](https://www.npmjs.com/package/rollup-plugin-cleaner)**
    - A rollup plugin to clean directories before rebuilding.


- **[rollup-plugin-peer-deps-external](https://www.npmjs.com/package/rollup-plugin-peer-deps-external)**
    - Automatically externalize `peerDependencies` in a `rollup` bundle.


- **[@rollup/plugin-json](https://www.npmjs.com/package/@rollup/plugin-json)**
    - A Rollup plugin which Converts .json files to ES6 modules.


- **[@rollup/plugin-node-resolve](https://www.npmjs.com/package/@rollup/plugin-node-resolve)**
    - A Rollup plugin which locates modules using the Node resolution algorithm, <br>
    for using third party modules in node_modules.


- **[rollup-plugin-typescript2](https://www.npmjs.com/package/rollup-plugin-typescript2)**
    - Rollup plugin for typescript with compiler errors.
    - Works with **[ttypescript](https://www.npmjs.com/package/ttypescript)** and **[typescript-transform-paths](https://www.npmjs.com/package/typescript-transform-paths)**. 


- **[@rollup/plugin-commonjs](https://www.npmjs.com/package/@rollup/plugin-commonjs)**
    - A Rollup plugin to convert CommonJS modules to ES6, <br>
    so they can be included in a Rollup bundle.


- **[@rollup/plugin-babel](https://www.npmjs.com/package/@rollup/plugin-babel)**
    - A Rollup plugin for seamless integration between Rollup and Babel.
    - Works with **[@babel/plugin-transform-runtime](https://www.npmjs.com/package/@babel/plugin-transform-runtime)** for rollup library.


- **[rollup-plugin-terser](https://www.npmjs.com/package/rollup-plugin-terser)**
    - Rollup plugin to minify generated es bundle. Uses terser under the hood.

## Usage

Create `rollup.config.js` and `babel.config.js` in project root.

`rollup.config.js`
```javascript
import buildRollupOptions, { Input, OutputBuilder } from '@choseohwan/rollup-builder';
import buildBasePlugins from "@choseohwan/rollup-plugin-builder-base";
// another imports...

// makes input object (rollup config's input option)
const input = new Input(
    {
        index: 'src/index.ts',
        option: 'src/option/index.ts',
        builder: 'src/builder/index.ts'
    },
    {
        umd: 'src/index.ts'
    }
);

// makes output builder
const outputBuilder = new OutputBuilder({
    sourcemap: true
});

// create plugins object using @choseohwan/rollup-plugin-builder-base
const plugins = buildBasePlugins();

// make rollup options with options
export default buildRollupOptions(
    input,
    [
        outputBuilder.buildES({
            dir: 'dist/esm'
        }),
        outputBuilder.buildCJS({
            dir: 'dist/cjs'
        }),
        outputBuilder.buildUMD('common', {
            dir: 'dist/umd'
        })
    ],
    plugins
);
```
<br>

`babel.config.js`
```javascript
module.exports = {
    // babel setup config here...
}
```

---
_Source: https://npm.io/package/@choseohwan/rollup-plugin-builder-base · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
