-
Notifications
You must be signed in to change notification settings - Fork 55
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
Build refactoring #95
Build refactoring #95
Conversation
@ivanpopelyshev You should consider removing one of the |
the umd build doesnt seem to work and looking at the code I am not sure if its wrapped at all. You can test it at this branch with gdevelop if you like. Just swap mine out for yours. it comes up as undefined when gdevelop loads it. Mine gets a bit further - its not undefined, but fails further down. A successfully loading example of a umd pixi library in gdevelop is pixi-multistyle-text, which is used by the bbcode extension |
@blurymind The UMD build is wrapped: I think I know what the problem is. The UMD build of |
@blurymind Can you try again? |
yes sure, thanks for helping me :) |
It gets a bit further now. The library is imported by gdevelop, but the moment I try to use it I get
|
@blurymind I forgot to assign |
Okay, try again :) |
This change seems to have regressed it. I get this now when trying to load the module |
Ugh. I thought the name was |
will this address the previous issue which is I need to debug this a bit more |
It should be there. Can you |
Ah interesting, now its loading fine, but I am getting a different error when trying to use it
|
That's function-related stuff, its supposed to be like that |
@blurymind Can you give me a test script using pixi-tilemap so I can debug this today evening? |
All I have at the moment is the PR branch getting it to work in gdevelop with an example json fileto use This used to work with a normal module, but after gdevelop was ported to pixi5 we are now required to use umd modules. My pr adds a new tilemap game object which should work in the IDE, but doesnt yet work when you playtest the game. I wonder if we can test this on something simpler - like a minimal example project |
I believe the problem is still in pixi-tilemap because the error I getwhen trying to use it is
Btw I was getting the exact same problem on my port to a umd module, which is the other pr here |
@blurymind I would open a separate issue for that - with a minimal reproduction. @ivanpopelyshev would be the guy looking at that 😅 |
Do we have any proof that pixi-tilemap works as a umd module in anything? :) |
Since the codebase is cleaner now, I might be able to help you too there. |
Up until now, there was no UMD module - so no. The error you're talking about is a runtime error - not something related to the UMD build (as far as I can see). |
I have a feeling that this is something that comes from its umd nature or pixi5, but its hard to tell. granted you need to swap the pixi library there with the new umd one + upgrade pixi4 there to 5 |
I made this as a testing ground It is also possible that some of the code still needs changing to work with pixi5 |
I updated my demo project now to better test against pixi-tilemap as it is in dist on master for pixi 5. The compiled version of the umd module does not work, the vanila version works fine. To test on localhost you can use I am either not using your umd right, or it definitely does not work
|
Have you managed to do some testing with the project I provided? Is there anything else I can do to help this PR? It's something we need to get pixi-tilemap working again in gdevelop and blocks my PR there atm I'm sorry I dont have quite as much experience with rollup. Perhaps we can try manually editing the resulting file to get it to work somehow? |
I have not yet, sorry. I’ve been working 8-9 hrs/day, 7 days/week for some time. Things to finish before closing a contract.
I might get time this weekend. Maybe @ivan can give a better guarantee.
…Sent from my iPhone
On Aug 19, 2020, at 6:58 AM, Todor Imreorov <[email protected]> wrote:
Have you managed to do some testing with the project I provided? Is there anything else I can do to help this PR? It's something we need to get pixi-tilemap working again in gdevelop and blocks my PR there atm
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFLJDB77V64X6JAUO4FL7OTSBOV5PANCNFSM4P7BLDPQ>.
|
I can accept other PR for now, if you are not sure about this one. |
@ivan Both PRs give the same result. Mine just has more things than the UMD build.
…Sent from my iPhone
On Aug 19, 2020, at 8:43 AM, Ivan Popelyshev <[email protected]> wrote:
I can accept other PR for now, if you are not sure about this one.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFLJDB4QWEWFQVBBSDNJJADSBPCHXANCNFSM4P7BLDPQ>.
|
I think you could merge it, but don’t publish the package. We can fix the UMD.build stuff this weekend.
…Sent from my iPhone
On Aug 19, 2020, at 8:43 AM, Ivan Popelyshev <[email protected]> wrote:
I can accept other PR for now, if you are not sure about this one.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFLJDB4QWEWFQVBBSDNJJADSBPCHXANCNFSM4P7BLDPQ>.
|
@blurymind I made a fix, can you recheck? |
Thank you, I will give this a try after work :) |
@SukantPal that fixes it! The UMD build works in the example minimal project now! |
ok, gonna re-publish it soon |
ah wait, there is something wrong with this |
sorry this might be a gdevelop related issue. It still fails in gdevelop unfortunately. I am trying to find out if its due to the module or gdevelop itself |
Hell, whats wrong? |
😆 |
seems not like a real UMD module, it will work without issue in the
browser, but I see no "require" at all that would make it compatible with
"CommonJS" and so it's possibly not loaded properly in Electron.
…On Thu, 20 Aug 2020, 18:49 Sukant Pal, ***@***.***> wrote:
😆
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#95 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRRWVI3GWEY64PFOGKWGNDSBVO2NANCNFSM4P7BLDPQ>
.
|
Ah, I’ll see what’s going. You can file an issue so we can continue this thread there.
Sent from my iPhone
On Aug 20, 2020, at 7:39 PM, Todor Imreorov <[email protected]> wrote:
seems not like a real UMD module, it will work without issue in the
browser, but I see no "require" at all that would make it compatible with
"CommonJS" and so it's possibly not loaded properly in Electron.
On Thu, 20 Aug 2020, 18:49 Sukant Pal, ***@***.***> wrote:
😆
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#95 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRRWVI3GWEY64PFOGKWGNDSBVO2NANCNFSM4P7BLDPQ>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFLJDBYLVC2T7IZCUP2MAQTSBWX45ANCNFSM4P7BLDPQ>.
|
Ah, I’ll see what’s going on. You can file an issue so we can continue this thread there.
Sent from my iPhone
On Aug 20, 2020, at 7:39 PM, Todor Imreorov <[email protected]> wrote:
seems not like a real UMD module, it will work without issue in the
browser, but I see no "require" at all that would make it compatible with
"CommonJS" and so it's possibly not loaded properly in Electron.
On Thu, 20 Aug 2020, 18:49 Sukant Pal, ***@***.***> wrote:
😆
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#95 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRRWVI3GWEY64PFOGKWGNDSBVO2NANCNFSM4P7BLDPQ>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFLJDBYLVC2T7IZCUP2MAQTSBWX45ANCNFSM4P7BLDPQ>.
|
@SukantPal opened a new ticket here |
Florian left a very helpful comment at the issue I linked. Perhaps it can help you with the followup PR? |
I’ve published the @pixi-build-tools/rollup-configurator package. @ivan and I are going to move official PixiJS plugins to use that rollup configuration instead - it outputs UMD instead of IIFE bundles.
…Sent from my iPad
On Aug 21, 2020, at 12:32 PM, Todor Imreorov <[email protected]> wrote:
Florian left a very helpful comment at the issue I linked. Perhaps it can help you with the followup PR?
I can help with testing the fix in electron
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFLJDBYSXATJ6AUJCPIIME3SB2OTFANCNFSM4P7BLDPQ>.
|
Synopsis 📃
This change will modernize pixi-tilemap's codebase to be up-to-date with the latest PixiJS standards 😃! I've done the following changes:
types.d.ts
: This declares@pixi/<packages>
modules and whatever classes pixi-tilemaps takes from those packages. This is necessary b/c onlypixi.js
has typings, but we import classes from@pixi/*
packages.import/export
: The ES6 import/export syntax makes things modular & allows us to build to UMD & ESM bundles.api-extractor
: Automated declaration file generation!rollup
: This allows us to generate the proper CJS, ESM, UMD, UMD minified bundles.namespace pixi_tilemap
: Removed that namespace from each file.index.ts
wraps all the exported classes at one place instead.