3

GitHub - scssyworks/rollup-scripts: A utility to simplify rollup configuration

 1 year ago
source link: https://github.com/scssyworks/rollup-scripts
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

rollup-scripts

A utility to simplify rollup configuration

This package is currently experimental and in active development.

Getting started

  1. Create an npm project
npm init
  1. Install rollup-scripts. NOTE: Do not install this package globally!
npm i -D --save-exact rollup-scripts
  1. Create src folder and an entry file index.mjs
mkdir src
touch src/index.mjs
  1. Add any valid JavaScript code.

  2. Update package.json file as follows

{
  "main": "dist/umd/index.js",
  "module": "dist/esm/index.mjs",
  "scripts": {
    "build": "rollup-scripts build"
  }
}
  1. Run command npm run build to compile the code.

Available commands

Rollup scripts at the moment only support init and build commands. For more details run:

npx rollup-scripts --help
npx rollup-scripts build --help

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK