3
GitHub - scssyworks/rollup-scripts: A utility to simplify rollup configuration
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.
rollup-scripts
A utility to simplify rollup configuration
This package is currently experimental and in active development.
Getting started
- Create an npm project
npm init
- Install
rollup-scripts
. NOTE: Do not install this package globally!
npm i -D --save-exact rollup-scripts
- Create
src
folder and an entry fileindex.mjs
mkdir src
touch src/index.mjs
-
Add any valid
JavaScript
code. -
Update
package.json
file as follows
{
"main": "dist/umd/index.js",
"module": "dist/esm/index.mjs",
"scripts": {
"build": "rollup-scripts build"
}
}
- 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
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK