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

Problems debugging javascript #1480

Closed
aaemnnosttv opened this issue May 28, 2015 · 4 comments · Fixed by #1487
Closed

Problems debugging javascript #1480

aaemnnosttv opened this issue May 28, 2015 · 4 comments · Fixed by #1487

Comments

@aaemnnosttv
Copy link
Contributor

While working with a Sage project, gulp; gulp watch

uglify is stripping out any debugger; statements (not to mention jshint complains about it too).

I can add "debug": true to .jshintrc but that obviously isn't great for production use.

It seems we need to be able to pass some different options to jshint and uglify if we're not running gulp --production. Perhaps forego uglify at all if not production?

@austinpray
Copy link
Contributor

Perhaps forego uglify at all if not production?

That's a negative Ghost Rider. You want to be running what goes into production on dev. I do not cross my fingers and hope it works when I deploy to staging and production.

It seems we need to be able to pass some different options to jshint and uglify if we're not running gulp --production.

Yeah let's only enable drop_debugger for --production runs. I'll do it unless you say you want to handle it.

@austinpray austinpray added this to the 8.2.3 milestone May 28, 2015
@aaemnnosttv
Copy link
Contributor Author

Yeah, I think that's best. Is there a way to do the same for jshint?

@austinpray
Copy link
Contributor

Well I guess you want it to stay in JSHint so you know the debug statement should be removed at some point right? JShint should only fail the build if it's --production. In dev it's a "by the way".

@austinpray
Copy link
Contributor

Yeah so JSHint was failing the task always. Now it only fails the build when you run scripts through --production.

austinpray added a commit to austinpray/sage that referenced this issue Jun 4, 2015
austinpray added a commit to austinpray/sage that referenced this issue Jun 4, 2015
austinpray added a commit to austinpray/sage that referenced this issue Jun 4, 2015
austinpray added a commit to austinpray/sage that referenced this issue Jun 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants