diff --git a/README.md b/README.md index ad88ccc..d8c43da 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,22 @@ var minified = banner.onebanner() + '\n' + uglify.minify(code, { fs.writeFileSync('src/test.js', minified); ``` +## Use in Rollup + +```js +import banner from 'bannerjs'; + +// rollup.config.js +export default { + input: 'src/main.js', + output: { + file: 'bundle.js', + format: 'cjs', + banner: banner.multibanner() + } +}; +``` + ## Command Line @@ -152,4 +168,4 @@ cat my-js.js | bannerjs -o | uglify-js > my-js.min.js # License -MIT license \ No newline at end of file +MIT license