https://github.com/videsk/rollup-library-template
Template to compile library with Rollup
https://github.com/videsk/rollup-library-template
Last synced: about 1 month ago
JSON representation
Template to compile library with Rollup
- Host: GitHub
- URL: https://github.com/videsk/rollup-library-template
- Owner: videsk
- License: mit
- Created: 2021-03-27T22:48:29.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-28T22:50:54.000Z (almost 5 years ago)
- Last Synced: 2025-02-28T09:48:01.140Z (over 1 year ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rollup starter library template
Use this Rollup configuration template with library projects. Is not recommended use with frameworks like Vue, Svelte, React or Angular, otherwise modify with your own Rollup configuration.
The compiled files will be exported and minify in `umd`, `cjs` (CommonJS), and `esm` (ES Modules) format. Also, it's used Babel for maximize compatibility of your code in browsers.
## Development
```shell
npm run dev
```
In development mode you will be able to play adding your code on `public/main.js`. Rollup automatically add a hot-reload on `bundle.js` file, where is the original library code. Remember, in dev mode only exports the UMD version (browsers).
## Production
```shell
npm run build
```
## Publish (NPM)
```
npm run upload
```
To publish to NPM can execute the command script `upload`. With the command will build and upload based on version in `package.json`.