Closed SparksRichard closed 7 years ago
Hi @SparksRichard -- just saw that you closed the ticket. Were you able to solve the problem?
Hey, yea I saw that there was a similar thread by JulioDel but was confused how to exactly do:
Hi @JulioDeL https://github.com/JulioDeL, there's currently no logic in this library to pick either the minified or complete version. Your build script or inclusion logic or whichever you have should pick which file you want to use in every environment.
This gives you complete flexibility as to mix it up: you can use minified everywhere, or only in PROD, you can use the original one everywhere or not. It's really up to you to decide.
As for the inclusion logic, just reference the .min version instead of the other one. That's all that there is to it!
I hope this helps.
A brief explanation would be appreciated.
Sure! You're probably referring to #35. #48 is also related.
The simplest option is for you to just use the minified version. Somewhere in your code, you're using the ng-pattern-restrict.js
file. Just change that to use ng-pattern-restrict.min.js
and you should have no debug info.
That is, in the case you're using the file directly in your HTML. Some people may be using a build script, a packager, or something that takes this library and puts it together with their code. In that case, you need to make the same change in that script or packager.
If you don't want to use the minified version, then you will need to define a global variable called DEBUG
and set it to false
.
Hello there, sorry if this is explained elsewhere but how would I disable all the console.log()ing that the directive is doing? It works beautifully, it's just clogging up my console. Thanks.