Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thgh/rollup-plugin-url-import
Resolve URL imports just like Deno
https://github.com/thgh/rollup-plugin-url-import
Last synced: about 1 month ago
JSON representation
Resolve URL imports just like Deno
- Host: GitHub
- URL: https://github.com/thgh/rollup-plugin-url-import
- Owner: thgh
- License: mit
- Created: 2019-02-06T09:12:27.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-14T08:56:51.000Z (over 5 years ago)
- Last Synced: 2024-09-30T18:41:41.337Z (about 1 month ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Rollup plugin that resolves URL imports
## Installation
```
npm install --save-dev rollup-plugin-url-import
```## Usage
```js
// rollup.config.js
import urlImport from 'rollup-plugin-url-import'export default {
input: 'input.js',
output: { file: 'output.js', format: 'esm' },
plugins: [
urlImport()
]
}
``````js
// input.js
import 'https://deno.land/thumb.ts'
import leftPad from 'https://dev.jspm.io/left-pad'console.log(leftPad('test', 8))
```### Options
The cache option is not yet implemented.
```js
urlImport({
// Cache fetched modules (default: false)
cache: true,// Cache fetched modules in specified folder
cache: '~/.deno/deps',// Enable output of fetched urls (default: false)
verbose: true,// Fetch named modules from jspm.io (default: false)
jspm: true
})
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Contributions and feedback are very welcome.
To get it running:
1. Clone the project.
2. `npm install`
3. `npm run build`
4. `npm run test`## Credits
- [Thomas Ghysels](https://github.com/thgh)
- [All Contributors][link-contributors]## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.
[link-author]: https://github.com/thgh
[link-contributors]: ../../contributors
[rollup-plugin-url-import]: https://www.npmjs.com/package/rollup-plugin-url-import