You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On number of different occasions have different people identified that it would be really useful if BRJS supported some sort of "pragma" functionality.
Best explained with an example
#if DEV
console.log('foo');
#endif
BRJS would then strip this code block when creating a WAR/flat file export.
There are numerous use cases: logging that should only be in when developing, assertions, benchamrking code, etc
I'm not proposing the syntax with this, just opening the feature request up for discussion.
It would be nice if we were also able to define custom pragmas, so that we could wrap certain bits of apps in this pragmas, and then strip them out depending on for which client we are building the app. <- haven't thought this one trough entirely.
The text was updated successfully, but these errors were encountered:
We have this feature for WEB.xml which I can see being useful. I wonder whether having it within JS/HTML etc may lead to bad habits though.
This could done via #749allow the use of tokens when exporting to static files where a config option set in a properties file can be used with an if/else in JS to optionally log something etc. - with this option the JS would still by present in every environment though instead of being filtered at 'build' time.
On number of different occasions have different people identified that it would be really useful if BRJS supported some sort of "pragma" functionality.
Best explained with an example
BRJS would then strip this code block when creating a WAR/flat file export.
There are numerous use cases: logging that should only be in when developing, assertions, benchamrking code, etc
I'm not proposing the syntax with this, just opening the feature request up for discussion.
It would be nice if we were also able to define custom pragmas, so that we could wrap certain bits of apps in this pragmas, and then strip them out depending on for which client we are building the app. <- haven't thought this one trough entirely.
The text was updated successfully, but these errors were encountered: