console.log
..., etc.) in the event-handler function. In general, it often happens to me that I’m sticking something on the keyboard by accident, then on the contrary, I delete it - in short, the use of editors without syntax highlighting and (preferably) analyzing the structure of the code is contraindicated to me.console.log(/* something */)
or console.dir(/* something */)
calls from your code.* This source code was highlighted with Source Code Highlighter .
- <? xml version = "1.0" encoding = "UTF-8" ? >
- < project name = "deploy" default = "stripFirebugConsoleCalls" basedir = "." >
- <! - a place where our folded still uncompressed and merged into one file ->
- < property name = "js" value = "js /" />
- <! - a regular schedule for catching unhealthy elements (shamelessly pulled from the yui builder, and slightly brought with a file)
- github.com/yui/builder/blob/master/componentbuild/shared/properties.xml 79th row ->
- < property name = "firebug.console.regex" value = "^. *? (?: console.log | console.dir). *? (?:; | \). *; | (?: \ r? \ n. *?) *? \). *;). *;?. *? \ r? \ n " />
- < property name = "firebug.console.regex.flags" value = "mg" />
- < property name = "firebug.console.regex.byline" value = "false" />
- < property name = "firebug.console.regex.replace" value = "" />
- <! - The target itself is also “inspired” by YUI Builder, the original is here:
- github.com/yui/builder/blob/master/componentbuild/3.x/module.xml 19th line ->
- < target name = "stripFirebugConsoleCalls" description = "Replace firebug console calls" >
- < replaceregexp byline = "$ {firebug.console.regex.byline}"
- match = "$ {firebug.console.regex}"
- replace = "$ {firebug.console.regex.replace}"
- flags = "$ {firebug.console.regex.flags}" >
- < fileset dir = "$ {js}" includes = "*. js" />
- </ replaceregexp >
- </ target >
- </ project >
ant stripFirebugConsoleCalls -buildfile /path/to/boom.xml
Source: https://habr.com/ru/post/71586/
All Articles