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

options in comments #361

Closed
szepeviktor opened this issue Dec 1, 2013 · 6 comments
Closed

options in comments #361

szepeviktor opened this issue Dec 1, 2013 · 6 comments

Comments

@szepeviktor
Copy link

Is it possible to specify options in comments?

/* uglifyjs unused=true */
@tomByrer
Copy link

tomByrer commented Apr 4, 2014

Good idea. Perhaps an external script can read a .js file, find & set configurations, then call UglifyJS?

@szepeviktor
Copy link
Author

Yes.
Could UglifyJS itself find these comments and set configuration?

@tomByrer
Copy link

tomByrer commented Apr 6, 2014

IMHO it would be better for an external project to read & set configurations.

@szepeviktor
Copy link
Author

Ok. I already use UglifyJS with a shell wrapper.

@alexlamsl
Copy link
Collaborator

All uglify-js options are globally applied and are not designed to enable/disable within regions of input code.

@szepeviktor
Copy link
Author

not designed to enable/disable within regions of input code.

It could be a misunderstanding.
I am thinking of something that jslint does.
Its directives could be specified as comments.

/*jslint
    bitwise, maxerr: 10, node
*/

http://www.jslint.com/help.html

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

3 participants