Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wzrd.in but as a scoped npm registry instead of a cdn #102

Open
forivall opened this issue Oct 3, 2017 · 5 comments
Open

wzrd.in but as a scoped npm registry instead of a cdn #102

forivall opened this issue Oct 3, 2017 · 5 comments

Comments

@forivall
Copy link

forivall commented Oct 3, 2017

A service like https://github.com/browserify/wzrd.in (browserify as a service), but instead of browserifying, uses babel to transpile it to es5 (or an option of environment with babel-preset-env). So, a package like whatwg-url would be installed via

# one time setup
npm config set @es5ify:registry https://es5ify.io

npm install @es5ify/whatwg-url

and scope names would remove the @ and replace the / with -- (like @angular/cli -> angular--cli, which i think is unused enough. or make the custom registry support some character that is allowed to be installed by the cli but not by the official registry (uppercase? starting with an underscore?)

Inspired by the issue seen at jsdom/whatwg-url#105

@ewnd9
Copy link

ewnd9 commented Oct 3, 2017

Wonderful idea 👍 As an alternative naming: @angular/cli => @angular/cli-es5 or even @angular/cli-transpiled-es5 / @angular/cli-transpiled-node0-10 (babel-preset-env case)

Also for reference: sindresorhus/ama#446

@forivall
Copy link
Author

forivall commented Oct 3, 2017

@ewnd9 the proposed naming you suggest wouldn't work unless you made the registry completely a mirror, and that would require all package installs to go through that mirror (at least the metadata, not sure about the protocol if the tgz can come from a different server), which would force the maintainer of this service to have higher bandwidth needs. putting everything under a scope allows only the transpiled packages to be fetched from the es5 transpiler registry (which is what npm config set @es5ify:registry https://es5ify.io does)

@Qix-
Copy link
Collaborator

Qix- commented Oct 12, 2017

I've actually told CDNJS that this is the only way they're going to stay relevant moving forward (see cdnjs/cdnjs#8531 (comment))

@nektro
Copy link

nektro commented Nov 28, 2018

Except ES6 is supported and the official ECMAScript way to handle modules. You are expected as a module developer to either compile or distribute browser-ready code if you want any of your modules to be use on the Web "moving forward"

@Richienb
Copy link

Richienb commented Jan 3, 2020

I think it might be best to create an NPM org and upload browserified bundles there. @org/name would become @es5ify/org__name and name would become @es5ify/name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants