I am using Google Closure Compiler.
I am writing an app for web use and for use in a Chrome packaged app. 99% of the code is the same. There are a few differences when it comes to things like local storage.
if(CHROME_APP) {
...
} else {
window.localStorage['something'] = true;
}
What is a good setup to allow for (ideally) compile-time choices of compiling the app. I see there is a @define declaration. Should that be used here? If so, how?
(I have in mind something like the existing COMPILED flag.)