-
Notifications
You must be signed in to change notification settings - Fork 83
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
[Feature] Allow // as a comment that stays in compiled file #403
[Feature] Allow // as a comment that stays in compiled file #403
Conversation
…flag to remove them
Maybe it is a good idea to use |
@mks-h You're right. Should the doc comment be removed too when the minify flag is present? |
I'd say yes, minified file should only have what's necessary to run — not a character extra. |
@mks-h But then that will impact the intellisense (provided by LSP) if someone hands you over a library in a minified version. Let's merge just this and mangle just the inner variables. How about that? |
Sure, sounds good to me |
i thought we want to make it so that the generated bash file should be readable to some extent so that the user could review it before running. ref: #227 |
tbh id rather leave the comments in the generated code and have the user remove them manually with |
If we require that users to run other commands to process the script generated is not a common behavior with scripting languages. |
For development and production builds — yes, it'd be great to have them readable. But minimization is a separate optional step, which should be able to run over both development and production builds. Its purpose is to represent given code in as little amount of characters as possible without modifying the way it runs or functions — basically compressing it by omitting unnecessary characters.
Thinking back on it, I'm not opposed to have minimization separate from the compiler, considering it most likely cannot gain anything from access to amber's inner-workings. That being said, having the |
…ng#403) * feat(comment): persist regular comments in bash code and add release flag to remove them * fix(comment): Resolve clippy linting issyes * fix(cc-flag): rename release to minify * fix(minify): remove weird minify file
--release
flag to optimise resulting code for production. For now it just removes the comments