Skip to content

Conversation

dbachrach
Copy link

This PR allows specific console statements to be preserved. We wanted this so we could use console.logs liberally through our codebase and have them stripped, but still allow very specific messages to be included for production.

In this PR, we look for console messages that begin with '!Stripify:Preserve!' to indicate which log messages should be preserved.

@waylonflinn
Copy link

I have similar needs. My thoughts on a solution were to specify a log level and use console.warn, console.error, etc.

@alanshaw
Copy link
Owner

alanshaw commented Jun 28, 2016

I appreciate the work done here but I think I prefer to use a comment to specify this, much like the linting tools do to disable linting on a specific line: http://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments

@alanshaw
Copy link
Owner

Closing due to inactivity

@alanshaw alanshaw closed this Sep 20, 2016
@1le
Copy link

1le commented Sep 20, 2016

Bummer, was just going to propose extending the logic to allow what @waylonflinn suggested. :) Anyhows, i created a pull request: #12

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

Successfully merging this pull request may close these issues.

4 participants