-
Notifications
You must be signed in to change notification settings - Fork 19
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
add minification step at prepublishOnly and test-ci #76
Conversation
The same version of node passes the same tests here as used by the failing CI tests. I'm not sure what causes this. |
I think the echo command is breaking the encoding |
I made a serious error storing the values in the variable first. I didn't find the esbuild option to allow over-writing to the source file so was trying to work around that. Fortunately, the ci tests are updated to test the minified sources and will catch this error if it happens in the future. iambumblehead/resolvewithplus#17 |
> npx esbuild ./src/*[mj]s --minify --allow-overwrite --outdir=src/
src/esmockModule.js 2.6kb
src/esmockLoader.js 1.4kb
src/esmock.ode.js 743b
src/esmock.js 731b
src/esmockCache.js 427b
src/esmockIsLoader.js 184b
⚡ Done in 3ms this command works nicely, should work in windows and has a nice little summary |
I couldn't find a way to make esbuild process a set of files in windows. The minify commands here aren't nice but maybe they could be replaced later on. |
31863c6
to
f3b715f
Compare
closes #71 |
@Swivelgames if you are available and would review this, please review
I tried two different esbuild minifier commands, because the main "--minifier" command broke esmock and caused the tests to fail.
esbuild $filename --minify
,esbuild $filename --minify-whitespace --minify-identifiers