I am new to using both requirejs and gruntjs. In my application, I have a debug flag set as follows:
var debugEnabled = true;
Is there a way for this flag to be automatically changed to false
during the requirejs
optimization process within a grunt
build?
EDIT:
Just to clarify, I have a single default task that executes the requirejs
optimizer. The variable debugEnabled
is located inside one of the modules in my application, such as AppLogger
, which is a dependency of main
.
Is there a method for the requirejs
build process to update this variable to false
, so that the minified version of AppLogger
doesn't execute console.log
statements, etc.