1.0.15 • Published 4 years ago

@common-web/rollup v1.0.15

Weekly downloads
10
License
MIT
Repository
-
Last release
4 years ago

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:

yarn add @common-web/rollup -D

npm:

npm install @common-web/rollup --save-dev
  1. Add scripts to your package.json
scripts: {
    "ts-check": "tsc --noEmit",
    "build": "ts-check && rollup -c"
}
  1. Run the build
yarn run build

Base plugin support:

Recommended Use

  • Small packages, backend using latest ESnext / Typescript

Setting up

// 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.

Custom Options

Ability to opt-out of default plugins:

// 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