Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stagas/skyfetch
rollup + skypack + fetch a module from npm to a single es6-ready file
https://github.com/stagas/skyfetch
Last synced: 14 days ago
JSON representation
rollup + skypack + fetch a module from npm to a single es6-ready file
- Host: GitHub
- URL: https://github.com/stagas/skyfetch
- Owner: stagas
- Created: 2020-11-02T20:51:42.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-04T16:27:27.000Z (about 4 years ago)
- Last Synced: 2024-10-10T12:12:30.826Z (about 1 month ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# skyfetch
es6 + rollup + skypack + jsdelivr + unpkg + wzrd.in
fetch an npm module from various CDNs to a single es6-ready file
## example
```sh
$ npm install -g skyfetch
...
$ skyfetch tinygradient
Fetching npm module from skypack: tinygradient
https://cdn.skypack.dev/tinygradient
https://cdn.skypack.dev/-/[email protected]/dist=es2020/tinygradient.js
https://cdn.skypack.dev/-/[email protected]/dist=es2020/tinycolor2.js
Finished. Output file: tinygradient.js
```Then simply import it:
`index.html`:
```html
import gradient from './tinygradient.js'
document.body.style.background = gradient('red', 'green', 'blue').css()
```
That's it, no bundlers to install, no complicated configurations.
Just an html file and you're ready to start working.### credits
Thanks to these awesome projects:
- [Skypack](https://www.skypack.dev/)
- [jsDelivr](https://www.jsdelivr.com/)
- [UNPKG](http://unpkg.com/)
- [wzrd.in](https://wzrd.in/)
- [browserify](http://browserify.org/)
- [rollup](https://rollupjs.org/)
- [rollup-plugin-cjs-es](https://github.com/eight04/rollup-plugin-cjs-es)
- [rollup-plugin-skypack](https://github.com/yj01jung/rollup-plugin-skypack)
- [rollup-plugin-url-resolve](https://github.com/mjackson/rollup-plugin-url-resolve)### License MIT