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

Way to enforce the standalone package name #86

Open
thom4parisot opened this issue Jul 11, 2014 · 3 comments
Open

Way to enforce the standalone package name #86

thom4parisot opened this issue Jul 11, 2014 · 3 comments

Comments

@thom4parisot
Copy link

If a module is named like peaks.js, where the . has a decorative value and not a namespace value, /standalone/peaks.js is equivalent to the --standalone peaks.js browserify command.

The issue is the exported module is exported as window.peaks.js, js becoming a property of the namespace peaks.

It does not seem to be doable in browserify/browserify#818: what could be a proper way to define the standalone module name for browserify-cdn?

I would definitely map /standalone/peaks.js as --standalone peaks, to match the library examples and so on.

Thanks for your insights :-)

@jfhbrook
Copy link
Collaborator

Probably I would just s/./_/ or similar, and then document it.

@stoeffel
Copy link

The same for modules with a - in the name.
f.e. 1-liners would become window.1-liners but this breaks before it even builds. see https://wzrd.in/standalone/1-liners@0.3.5
or https://wzrd.in/standalone/2dgeometry@latest (a module starting with a number is also not valid.)

refs 1-liners/1-liners/issues/128

@stoeffel
Copy link

I think the best solution would be to add a possibility for defining the standalone-variable f.e. https://wzrd.in/standalone/oneLiners/1-liners@latest

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

3 participants