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

idea: try testing generated code using a minifier #339

Open
kantord opened this issue Mar 17, 2019 · 0 comments
Open

idea: try testing generated code using a minifier #339

kantord opened this issue Mar 17, 2019 · 0 comments
Labels
good first issue Good for newcomers

Comments

@kantord
Copy link
Owner

kantord commented Mar 17, 2019

As generating human-readable code is not a current aim, and we're quite far from having it anyway, it would make sense to generate a code that is already "minified". (i. e. cannot be reduced more by a minifier).

This might not be possible to achieve to 100% without implementing some complicated compiler logic (for example determining whether some parenthesis are needed). Implementing those should not be an aim in emuto, as we should try not to increase the compiler size, and if someone cares so much about the output being minified, they can still run a minifier on top of emuto.

As we already have a lot of code examples in interpreter.test.js, it would only make sense to utilize that test file to implement this, by adding a new test cases that uses a minifier internally to calculate what % of the output bytes were removed by the minified. The test should not fail the CI just yet, we'll get to actually improving the generated code after we have tests for it.

@kantord kantord added the good first issue Good for newcomers label Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant