# @common-web/rollup

> Spend less time worrying about setting up plugins just to use latest ES6 or typescript features.

Latest version **1.0.15** (published 2019-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @common-web/rollup
pnpm add @common-web/rollup
yarn add @common-web/rollup
bun add @common-web/rollup
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.15 |
| Published | 2019-12-30 |
| First published | 2019-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 52.1 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jerry Chang |
| Maintainers | jareechang |

## Links

- npm: https://www.npmjs.com/package/@common-web/rollup
- npm.io page: https://npm.io/package/@common-web/rollup

## Dependencies (7)

- [rollup](https://npm.io/package/rollup.md) ^1.27.14
- [typescript](https://npm.io/package/typescript.md) ^3.7.4
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.7.7
- [@rollup/plugin-json](https://npm.io/package/@rollup/plugin-json.md) ^4.0.1
- [rollup-plugin-babel](https://npm.io/package/rollup-plugin-babel.md) ^4.3.3
- [rollup-plugin-eslint](https://npm.io/package/rollup-plugin-eslint.md) ^7.0.0
- [@rollup/plugin-typescript](https://npm.io/package/@rollup/plugin-typescript.md) ^2.0.1

## Recent versions

- 1.0.15 (latest) — 2019-12-30
- 1.0.14 — 2019-12-30
- 1.0.13 — 2019-12-30
- 1.0.12 — 2019-12-30
- 1.0.10 — 2019-12-30
- 1.0.9 — 2019-12-27
- 1.0.8 — 2019-12-27
- 1.0.6 — 2019-12-27
- 1.0.1 — 2019-12-27
- 1.0.0 — 2019-12-27

## README

## Why ?

Spend less time worrying about setting up plugins just to use latest ES6 or typescript features.

Just install and use.

## Getting started

1. Install the pkg:

**yarn:**
```js
yarn add @common-web/rollup -D
```

**npm:**

```js
npm install @common-web/rollup --save-dev
```

2. Add scripts to your package.json

```json
scripts: {
    "ts-check": "tsc --noEmit",
    "build": "ts-check && rollup -c"
}
```

3. Run the build
```sh
yarn run build

```

**Base plugin support:**
- eslint (see [rollup-plugin-eslint](https://github.com/TrySound/rollup-plugin-eslint) for options)
- babel (see [@common-web/babel](https://github.com/Jareechang/common-web/tree/master/packages/babel) pkg for a list default ready to use config)
- typescript (see [@rollup/plugin-typescript](https://github.com/rollup/plugins/tree/master/packages/typescript) for options)

#### Recommended Use

- Small packages, backend using latest ESnext / Typescript

### Setting up

```js
// rollup.config.js

import { getBaseRollupPlugins } from '@common-web/rollup';

const plugins = getBaseRollupPlugins({
    // eslint: { baseConfig: require('./eslintrc.js') } if you are using `eslintrc.js`
}).conat([
    // Include your own plugins to support other features 
]);

export default {
    input,
    output,
    plugins
}

```

for more configuration options visit [rollup](https://rollupjs.org/guide/en/).

### Custom Options 

**Ability to opt-out of default plugins:**

```js
// rollup.config.js

import { getBaseRollupPlugins } from '@common-web/rollup';

const plugins = getBaseRollupPlugins({
    eslint: {
        disabled: true
    },
    json: {
        disabled: true
    }
}).conat([
    // Include your own plugins to support other features 
]);

```

### Examples 

- Building small TS util lib [common-web-rollup-example](https://github.com/Jareechang/common-web-rollup-example)

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