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

Solve module compatibility issues, clean up project. #105

Closed
wants to merge 3 commits into from

Conversation

martinemmert
Copy link

@martinemmert martinemmert commented Nov 17, 2020

This PR fixes the issues regarding the globally used PIXI object and adds support for umd, cjs and esm module types. Sorry for it being that huge. It makes more sense if the code is checked out locally, since a lot of these changes came through prettierjs, moving files and replace yarn by npm.

Since there are no tests, and I am not aware of how I can test this properly with integration tests, you have to trust me when I say it works on my machine 😏 (I updated the examples and added a serve command to ease the use of them locally)

Changes introduced in this PR:

  • implemented tsdx as a build tool and set it up for pixi.js packages
  • fix linter errors which occurred after installing one
  • fix typescript type issues
    • NOTE: the code needs to be refactored with better type guards and updated typings
  • reformat code with prettier
  • move example assets into the public folder, serve project_dir with npm serve
  • remove yarn (npm 7 is way better)
  • update tsconfig and set the output to tsnext
  • target new browsers without ie11 (might be a bit too strict, and can be revisited especially for the umd export )
  • remove auto plugin registration
  • add documentation on how to register this plugin
  • add documentation on how to import/required this plugin
  • add documentation on how to serve the examples locally

Solves, relates or helps with the following issues:
#104 #97 #81 #62 #59 #18 #15

- implemented tsdx as standard build tool and set it up for pixi.js packages
- fix linter errors which occured after installing one
- fix typescript type issues
  - NOTE: the code needs to be refactored with better type guards and updated typings
- reformat code with prettier
- move example assets into public folder, serve project_dir with `npm serve`
- remove yarn (npm 7 is way better)
- update tsconfig and set the output to tsnext
add documentation on how to register this plugin
add documentation on how to import/required this plugin
add documentation on how to serve the examples locally
@martinemmert
Copy link
Author

@ivanpopelyshev is it possible to upgrade the npm version to version 7 on Travis?
npm 7 does install peer dependencies per default and should fix the current issue since pixi.js is marked as a peer dependency.

@spassvogel
Copy link
Contributor

Does this mean we no longer have to expose PIXI as a global variable? This is great!

@martinemmert
Copy link
Author

Does this mean we no longer have to expose PIXI as a global variable? This is great!

Exactly.

Since the author went silent, maybe you can try out my PR and post your findings here.

@spassvogel
Copy link
Contributor

Okay I don't mind to do that. So once I've pulled your branch I gotta do npm build and npm link and then npm link pixi-tilemap from my project folder to test it in my project locally, right?

@martinemmert
Copy link
Author

Yes, that's how I use it currently. Make sure you have npm 7 installed 👍

@ShukantPal
Copy link
Member

This should be handled by #111 , #110 , #95. Working on a leaner and better documented pixi-tilemap for v3.

@ShukantPal ShukantPal closed this Mar 6, 2021
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.

3 participants