-
Notifications
You must be signed in to change notification settings - Fork 137
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
Rewrite to ESM, simplify build process (npm scripts instead of Grunt) #132
Conversation
Diffs look larger than they are due to whitespace. Build tools still need to be updated.
Answers on your questions that could be done:
|
Great PR, great improvement. Also thank you for the commentary provided with the PR, makes it really clear. Do you have any steps in mind to taking jsep to a next level? Going for more extensibility? (In my mind is the open #123, and the Object literal you've mentioned as well). (I was also thinking about some benchmark-tests, not because they might be necessary, but because I'm interested). |
Glad you like it, and thanks for the quick review! Should I merge and send a separate PR for ESLint?
Yes, absolutely. I think extensibility should be a top priority right now, and it's something I've wanted to do for a while but never got around to until #123 gave me the nudge I needed :) . |
Oh also, should I remove the old build tools? |
Yes, that is fine. Let's move forward. (Next release will be a biiger one than usual anyway, so let's gid rid of things that we move away from). |
Great, done. |
[Bb]uild/ | ||
dist/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LeaVerou - I wonder if the build should be moved back to the build
folder (instead of dist
) for better compatibility with existing versions? (Could be part of #152 ). I just saw a comment in donmccurdy/expression-eval#41 that made me wonder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dist
is convention though.
What if we add a file to build
that prints out something like "JSEP has moved to using dist
instead of build
. Please use dist
instead"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we could probably just note it in the changelog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely note it in the changelog!
This is a fairly substantial PR, but diffs look larger than they are due to whitespace (since no IIFE was needed anymore, the entire source was un-indented), please review with
?w=1
.I also started removing some of the micro-optimizations I mentioned in #131.
All tests still pass (obvs).
The build process is now using npm scripts instead of Grunt/Gulp and the like and consists of:
http-server
to start a small local server as Puppeteer seemed to be having issues with running QUnit overfile:///
. Not sure if we can avoid it or how it was avoided previously (perhaps the Grunt plugin did something like that internally?).Things I have not done, but either I plan to, or I can if needed:
'test/unit_tests.js'
and'test/unit_tests/*.js'
but I don't see anyunit_tests
directory intest
?I left in the previous build process as well, but I can remove it in a future PR.
Please let me know if there's anything else I forgot!