Skip to content

Make PgnViewerJS easy to use in different environments - #187

Merged
mliebelt merged 2 commits into
mliebelt:masterfrom
LTe:assets-and-umd
Jan 30, 2021
Merged

Make PgnViewerJS easy to use in different environments#187
mliebelt merged 2 commits into
mliebelt:masterfrom
LTe:assets-and-umd

Conversation

@LTe

@LTe LTe commented Jan 27, 2021

Copy link
Copy Markdown
Contributor

Allow to use pgn-viewer with other import methods

Universal Module Definition is a way of building javascript library.
After this change it will be available from global variable, requirejs,
commonjs and es6 module.

Add example for ReactJS

Related: #162

Universal Module Definition is a way of building javascript library.
After this change it will be available from global variable, requirejs,
commonjs and es6 module.
@mliebelt

Copy link
Copy Markdown
Owner

Thank you a lot for providing the pull request! I have looked at you commits, and I will check them. In my opinion, the first and third ones are easy, and I would like to include them anyway. The second one is critical (in my opinion) because it will change the size of the file a lot. I have done a different approach (and I am not completely glad with it), but it has some advantages. The files contained in the asset folder are not used by most people most of the time. So downloading them all them time, for the 1% usage of 1% of people is not the best solution, in my opinion.

Therefore, could you split the pull request into 2, and have the second (Bundle assets...) separated?

@LTe

LTe commented Jan 27, 2021

Copy link
Copy Markdown
Contributor Author

@mliebelt updated and created separate PR. We can discuss assets bundle #188 there.

@mliebelt
mliebelt merged commit 0eeca7d into mliebelt:master Jan 30, 2021
@mliebelt

Copy link
Copy Markdown
Owner

So I will give it a try and check the result. What is to be checked:

  • Is there any change in interface for other users, so if they had pgn-viewer running before, do they have to change anything.
  • What are the additional possibilities to deploy / use pgn-viewer? Is that possible now out of the box, or is that only a preparation, but something has to be done further?

So perhaps there will be adjustments to your PR, but hopefully it will work. Before doing the next release, I have to check the questions above.

Thank you a lot for providing your pull request!

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

Successfully merging this pull request may close these issues.

2 participants