Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SaekiRaku/qi-rollup-dev
Provide useful preset configs and tool functions for rollup.
https://github.com/SaekiRaku/qi-rollup-dev
Last synced: about 1 month ago
JSON representation
Provide useful preset configs and tool functions for rollup.
- Host: GitHub
- URL: https://github.com/SaekiRaku/qi-rollup-dev
- Owner: SaekiRaku
- License: mit
- Created: 2019-12-26T16:10:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:43:41.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T02:01:39.691Z (about 1 month ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - qi-rollup-dev
README
# Qi Rollup Dev
Provide useful preset configs and tool functions for `rollup`, just like a start-up template but with more controllability. The main goal of this project is reduce the time for design development environment.
**NOTICE: This project is experimental, use at your own risk if you'd like use it for production purpose.**
## Features
* ~~Out of the box of preset configs covered for most common useage of `rollup`.~~ (Only library development by now.)
## Todo
* Add preset for `typescript`
## Useage
This project didn't have complicated functions, so I'm just going to provide some example code.
### Case 1 - Node library
Only 5 lines of core code to create a framework for NodeJS library development.
```javascript
const QiRollupDev = require("@qiqi1996/qi-rollup-dev");// Create instance and provide basic info of project.
var dev = new QiRollupDev({ name: "LibraryName", input: "/path/to/entry.js", output: "/path/to/output.js" });// Add output config for `rollup` that can output two type of modules(CommonJS & ESModules).
// It will generate 3 files at last, which are `output.js(CommonJS, cause it's the first argument)`, `output.cjs.js(CommonJS)`, `output.esm.js(ESModule)`.
dev.presets.formats("cjs", "esm");// You can check(or modify) the final config of rollup by this:
// dev.config.plugins = [ babel(), strip(), ... ]
// console.log(dev.config);// Auto rebuild when code changed. For `evt` object, see: http://rollupjs.org/guide/en/#rollupwatch
dev.watch({ callback: (evt) => { "Do something..." } });// Bundle up the whole project.
dev.build();
```### More Cases
See example code [Go→](./example/)
## License
MIT
Copyright 2019(c), qiqi1996.com. All right reserved.