2.0.3 • Published 3 years ago

@choseohwan/rollup-builder v2.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

@choseohwan/rollup-builder

rollup builder for rollup config easier

Install

npm

npm install @choseohwan/rollup-builder --save-dev

yarn

yarn add @choseohwan/rollup-builder -D

Usage

Overall usage example

rollup.config.js

import buildRollupOptions, {Input, OutputBuilder, Plugin, Plugins} from '@choseohwan/rollup-builder';
import cleaner from "rollup-plugin-cleaner";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
// 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
});

// makes plugins object 
const cleanerPlugin = new Plugin(
    'rollup-builder-cleaner',
    cleaner,
    (output) => [
        {
            targets: [output.getOutputDir()]
        }
    ]
);

const peerDepsExternals = new Plugin(
    'rollup-plugin-peer-deps-external',
    peerDepsExternal,
    []
);

const plugins = new Plugins(
    cleanerPlugin,
    peerDepsExternals,
    // ...
);

// 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
);
2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

1.1.8

3 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.36

4 years ago

1.1.0-alpha-18.0

4 years ago

1.1.0-next.0

4 years ago

1.0.34-alpha-8.0

4 years ago

1.0.34-alpha-6.0

4 years ago

1.0.35-alpha-9.0

4 years ago

1.0.34

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.1.0-alpha-4.7

4 years ago

1.1.0-beta.7

4 years ago

1.0.30

4 years ago

1.0.29-next.14

4 years ago

1.0.29-next.16

4 years ago

1.0.29-next.15

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.29-next.4

4 years ago

1.0.29-beta.3

4 years ago

1.0.22

4 years ago

1.0.19

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago