plicatibu Posted October 24, 2013 Share Posted October 24, 2013 C/C++ have a feature I love: defines. Java, on the other hand, doesn't have it. Thank to a antenna I'm able to use defines and with the same code base generate binaries specific for J2ME MIDP1 / MIDP2 and BlackBerry, enabling or not many features like SMS, support for touch devices and so on. I'm wondering whether there is such a project to enable / disable insertion of code during build time for JavaScript with something similar to defines. Regards. Quote Link to comment Share on other sites More sharing options...
onefrankguy Posted October 24, 2013 Share Posted October 24, 2013 Take a look at preprocessor.js. It supports #define, #include, and #ifdef among others.https://github.com/dcodeIO/Preprocessor.js Quote Link to comment Share on other sites More sharing options...
plicatibu Posted October 25, 2013 Author Share Posted October 25, 2013 That's exactly what I was looking for. Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.