skyfetch
v1.1.0
Published
fetch an npm module from various CDNs to a single es6-ready file
Downloads
6
Maintainers
Readme
skyfetch
es6 + rollup + skypack + jsdelivr + unpkg + wzrd.in
fetch an npm module from various CDNs to a single es6-ready file
example
$ 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
:
<script type="module">
import gradient from './tinygradient.js'
document.body.style.background = gradient('red', 'green', 'blue').css()
</script>
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
- jsDelivr
- UNPKG
- wzrd.in
- browserify
- rollup
- rollup-plugin-cjs-es
- rollup-plugin-skypack
- rollup-plugin-url-resolve