-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Library build and dependencies refactoring #5791
Comments
I believe the last tag @/endu is not correct, you probably meant @endurance21! |
The main problem has been stated very clearly. Currently we are having trouble making the build and it all comes down (as far as I'm concerned) to uglify not liking new syntax. Given the options, I think it's better to first bundle → transpile, which will cause less issues down the line since all the necessary code is already considered. Looking forward to hearing from the community! |
Thanks, corrected. Github autocomplete failed me 😄 |
Thanks @limzykenneth and @jesi-rgb. I am adding the Build Process stewards @outofambit and @kungfuchicken to this conversation. |
I think the one of the main issue we encountered was with This plugin is necessary to read the content of file and make it available inline while bundling. If I am not wrong that plugin works with "babelify", so if we are intending to go with Also some third party library is contains the "fs" calls too so we may need to perform static-fs work on those libraries also, but in current implementation the static-fs works only for our own codebase ( the default behaviour of browserify) and when we tried making it a global behaviour it thrown errors. So just to wrap-up, we need to keep in mind that static-fs calls must be dealt when we are thinking any approaches to transpiling our code. |
static-fs is basically replacing something called brfs when it is implemented, they both do the same thing which is replacing the fs calls to be inline content. |
In addition to supporting current syntax, would be great to improve the build time (with, for example, |
Ah yes, there's some findings on that as well. The two most notable things that takes the most time are
It would be a good idea to look into removing prettier entirely as well since it's been a bit problematic with version updates, so this will be one priority for improving build times for me. |
While trying to clean up the build some of the existing dependencies we have I find that, mainly polyfills, are supported by all our stated browsers except for Opera Mini. I had a quick look and found that Opera Mini supposedly doesn't run Javascript locally, which makes me doubt that it works with p5.js at all regardless of if we include the polyfills or not. I can't test this as I don't have an Android device with me. Would someone here with an Android device try it out and confirm if p5.js (or even canvases) can work with Opera Mini at all? |
I just tried it out. It looks like in the default mode, it still runs local js for canvases. If you change the settings to "Extreme Savings Mode", I think in that case it runs no local js, and all canvases break. |
I guess we'll leave it for now in that case. I'm going to have another go at trying to remove prettier and whether I manage to or not, #5792 should be ready for review and merge by then. |
Topic
As part of a refactoring of the build and release process, there are some options that may need some discussions on related to some discussions around the implementation of
saveGif()
@jesi-rgb has been working on.Just tagging a few people I can think of off the top of my head but if you have some thoughts please share.
@Qianqianye @stalgiag @davepagurek @endurance21
The text was updated successfully, but these errors were encountered: