-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Added UMD #3377
Added UMD #3377
Conversation
Another pros - you can define as many private var as you need. Like that var |
I'm not knowledgeable about JavaScript enough to have an opinion: I only care that this doesn't break existing demos. I'll leave @atoppi to evaluate if this could cause us problems. I do notice that this apparently didn't pass our linter check on Github Actions, though. |
linter errors on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the linting issues.
I see nothing wrong about the PR.
If @lminiero is fine with moving the Janus
definition from the top level to an immediately invoked function then we're good to go.
|
@redexp yeah, please fix those and also the issues about indentation. |
…d rule about global vars
@atoppi I'v added rule to ignore one indent in main part code. It's ok practice with UMD, eslint itself shows example how to do it |
Merging, I'll figure out how to better fix the eslint stuff by myself. |
- package.json and package-losck.json have been moved to project root - eslint.config.mjs created in the project root - lint every script - fix rollup related scripts after the merging of #3377
@redexp add to do a bunch of modifications due to the broken rollup script after your merge. |
instead of this
I'd rather do like
|
Unfortunately we have a rollup script that bundles |
No braking changes, but now this file can be treat as module for commonjs or require.js or have regular global Janus var
I used this UMD template https://github.com/umdjs/umd/blob/master/templates/returnExports.js