0.3.3 • Published 7 days ago

lurantis v0.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 days ago

lurantis

An HTTP server that bundles and serves packages from NPM; "bundler as a service."

Usage

Run the server:

npx lurantis --port 8080

Then, send GET requests to it:

curl http://localhost:8080/npm/lodash@4.17.21

It'll fetch the package and all its dependencies from npm, bundle it up into a UMD module, and respond with the script:

HTTP/1.1 200 OK
Content-Type: text/javascript;charset=UTF-8
X-Global-Name: _LUR_lodash_4_17_21

(function (global) {
// ...the rest of the response is omitted from this README...

Note the X-Global-Name header. This indicates the global that the package's exports will be written to when the bundle is loaded as a script in a browser. It won't ever change, but you can check that header when setting up your script tag, to know what global to look for.

If you want to minify the code, too, add ?minify=true to the end of the URL:

curl http://localhost:8080/npm/lodash@4.17.21?minify=true

License

MIT

0.3.3

7 days ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago