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

ES6 Compatibility? #32

Open
BenDavisson opened this issue Dec 10, 2020 · 0 comments
Open

ES6 Compatibility? #32

BenDavisson opened this issue Dec 10, 2020 · 0 comments

Comments

@BenDavisson
Copy link

According to the readme:

jsmin makes no attempt to be compatible with ECMAScript 6 / ES.next / Harmony

However, you also include:

If you're using jsmin on ES6 code, though, you might find the quote_chars parameter useful:
from jsmin import jsmin with open('myfile.js') as js_file: minified = jsmin(js_file.read(), quote_chars="'\"")

I'm a bit puzzled. Can jsmin handle ES6 by using the referenced quote_chars parameter? Or is it always dangerous to use jsmin on any ES6 code?

I tested it out by including a few features from ES6(arrow functions and Promises) in the javascript file I'm minifying with jsmin.

Everything runs correctly. Could we enhance the readme.md to clarify what is wrong with using jsmin on ES6?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant