-
Notifications
You must be signed in to change notification settings - Fork 43
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
Update app structure #8
Conversation
I need a way to publish this as a simple browser script that works without browserify or webpack. |
Currently, I don't have a working solution for that. Maybe from this setup, there is a way to create a build script that will bundle a single file for you, but I am not sure how to attach it to the window.PIXI object. Maybe an IIFE inside the index.ts 🤔 ? Pixi.js manages to do this well, but I don't have time atm to see how they manage to create and export bundles for both worlds. |
I've updated the npm package, can you check if it works for you via |
@buryo I fixed those problems. There was a missing import in the DefaultBoxGenerator |
@Mwni I tested it with these latest changes. Btw It is exported as default so |
Is it working now (v1.0.3)? |
For me, no. ( all my projects are with typescript and currently, you are not exporting any d.ts for a beginning ). As an advice, you could use this template from me currently and export a version 2.0.0 from it that will have some breaking changes, but people will be able to use this lib or I could publish the fork I have for @buryo and other folks. |
We are currently working on infrastructure for plugins for v5, including ones on typescript. When time comes I'll notify you, maybe our template will be good enough for you too :) |
@jkanchelov Of course, feel free to fork it and publish it for typescript. On my end, i'll first have to familiarize myself with typescript, otherwise I can't make updates anymore. |
If I have some free time I will. About the typescript thing .. it's really something like the modern type of writing javascript, but provides you some compile-time errors that could save you some time finding stupid errors + makes things easier with the generation of d.ts for the things you write out of the box ( that comes useful for many people ) I recommend you to check it and there is a big chance that you would like it |
Unless you already have traumatic experience with types http://www.html5gamedevs.com/topic/42970-how-to-extends-pixiextrasanimatedsprite/?tab=comments#comment-242015 :) |
eb84ab9
to
1f647f6
Compare
Invalidated by fae5465 |
So .. what I've done here is to update the project structure following a typescript boilerplate I am currently using and with whom I export few things like pixi-console pixi-fps.
There are some tradeoffs in this way and I guess the most major one is that you can't include it as simple as just put the TextInput.js to the head of an HTML file and expect it to work. In most of the projects tho I use some module bundler like browserify or webpack and I don't have problems with that