npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rollup-all

v1.10.6

Published

A lightweight, extensive and configurable npm package for building all your ES6 source codes in one parse using rollup

Downloads

136

Readme

Rollup-all

Build Status Coverage Status semantic-release npm version npm

Overview

Rollup-all is an out of the box package for building all your shiny Javascript/Typescript library source codes in one parsing, allowing you to generate commonjs, es module, and browser builds at once. It is very configurable and runs asynchronously.

It allows you to configure the build process, letting you define what should be included and excluded in the build, if sourcemap should be generated, if minified versions of the build should be generated, if asset and type definition files should be copied over, and lots more...

It comes with all needed configurations already done for you, including support for typescript projects. It uses Rollup's JavaScript API to automate the build process.

Getting Started

npm install --save-dev rollup-all

Next, add the build script to your package.json file

{
  "scripts": {
    "build": "rollup-all"
  }
}

Advanced Configuration

In case you need to do some other configurations, such as passing extra babel presets, babel plugins, rollup plugins, and build config, then you can create a rollup.config.js file at the root of your project. Like shown below:

const { config } = require('rollup-all');
module.exports = config(options);

The above code is the way to configure the build process. The good thing is that it is self documented, because it is a typescript project, and has typings generated.

Below is a brief documentation of the options object.

The Options Object

The options object takes two objects, config and babelConfig.

  1. Babel Config

Babel config object takes presets array and plugins array. These are added to the already existing presets and plugins used internally.

By default, The following presets are added automatically:

  1. @babel/preset-env
  2. @babel/preset-typescript

The following babel plugins are added automatically:

  1. @babel/plugin-proposal-class-properties

  2. @babel/plugin-proposal-nullish-coalescing-operator

  3. @babel/plugin-proposal-object-rest-spread

  4. @babel/plugin-transform-runtime

  5. @babel/runtime

  6. Config

The config object is where you configure build specific options, and also where you extend the rollup plugins. it accepts a plugins array, that are added to the already used plugins. Below is a list of already added plugins

  1. rollup-plugin-babel
  2. @rollup/plugin-commonjs
  3. @rollup/plugin-node-resolve
  4. rollup-plugin-terser
  5. @rollup/plugin-json

The config option takes other configuration options, such as sourcemap option, interop, uglify, assets array, distConfig options (where you can configure options specifically for browser builds, such as externals). etc. Note that distConfig.enabled options is set to false by default.

Contributing

We welcome your own contributions, ranging from code refactoring, documentation improvements, new feature implementations, bugs/issues reporting, etc. Thanks in advance!!!