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

Do sanity checking of output JavaScript #3

Open
gingeleski opened this issue Dec 18, 2018 · 1 comment
Open

Do sanity checking of output JavaScript #3

gingeleski opened this issue Dec 18, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@gingeleski
Copy link
Member

Blocked by #2

When this is "compiling" JavaScript via src/compile.py, there should be some "sanity-checking" on the output.

Looks like this would be made possible by adding a requirement (there will be a requirements.txt now)

pip install pyjsparser

Then parse the script and check for an exception like so...

import pyjsparser

try:
    pyjsparser.parse(output_javascript)
except:
    print('Your JavaScript sucks')
@gingeleski gingeleski added the enhancement New feature or request label Dec 18, 2018
@gingeleski gingeleski self-assigned this Dec 18, 2018
@gingeleski
Copy link
Member Author

Ehh decided not to prioritize this. Right now we've got zero dependencies, no need for requirements.txt.

This crosses that line and if the Python starts outputting shitty JS, the root cause should be addressed.

If maintenance of this project (new versioning) becomes completely automated then this would become more important. Right now I don't see it that way. Removing myself for the time being.

@gingeleski gingeleski removed their assignment Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant