<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Thanks Chris this is really in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032192#M42515</link>
    <description>&lt;P&gt;Thanks Chris this is really helpful,&lt;/P&gt;

&lt;P&gt;I looked at UglifyJS and the dead_code flag will do the job.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;How do I do this in XDK? My intuitive idea is to make a script that runs UglifyJS and saves the output in&amp;nbsp;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;a parallel project. Then I test the parallel project. Is this the way?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jul 2015 08:06:04 GMT</pubDate>
    <dc:creator>Thomas_V_1</dc:creator>
    <dc:date>2015-07-31T08:06:04Z</dc:date>
    <item>
      <title>preprocessor #ifdef?</title>
      <link>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032187#M42510</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;I want to remove all &amp;nbsp;my debug code and comments before launching. Maybe also sort versions and different platforms. &amp;nbsp;I&lt;/SPAN&gt;s there a preprocessor #ifdef function implemented in xdk or JS, Html, Less? Or is there another way I can do this?&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Any experiences?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 07:21:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032187#M42510</guid>
      <dc:creator>Thomas_V_1</dc:creator>
      <dc:date>2015-07-30T07:21:14Z</dc:date>
    </item>
    <item>
      <title>Unfortunately JS has no</title>
      <link>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032188#M42511</link>
      <description>&lt;P&gt;Unfortunately JS has no preprocessor functionality. I's not a compiled language live Java or C# and XDK doesn't do anything with your JS files.&lt;/P&gt;

&lt;P&gt;There are a few external options: &lt;A href="http://stackoverflow.com/questions/7376131/ifndef-in-javascript" target="_blank"&gt;http://stackoverflow.com/questions/7376131/ifndef-in-javascript&lt;/A&gt;&lt;BR /&gt;
	(and maybe more...)&lt;/P&gt;

&lt;P&gt;In our project we use a global variable: debugMode and use it in our JS code, but that doesn't work for comments....&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 09:09:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032188#M42511</guid>
      <dc:creator>Ad</dc:creator>
      <dc:date>2015-07-30T09:09:00Z</dc:date>
    </item>
    <item>
      <title>Thanks for your answer. I</title>
      <link>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032189#M42512</link>
      <description>&lt;P&gt;Thanks for your answer.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I hope XDK will implement such a function. I would make the apps smaller and faster. I think this would be very welcome by the community.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 10:26:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032189#M42512</guid>
      <dc:creator>Thomas_V_1</dc:creator>
      <dc:date>2015-07-30T10:26:38Z</dc:date>
    </item>
    <item>
      <title>I guess it has to be made</title>
      <link>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032190#M42513</link>
      <description>&lt;P&gt;I guess it has to be made like special comments otherwise jslint etc would not work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 10:29:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032190#M42513</guid>
      <dc:creator>Thomas_V_1</dc:creator>
      <dc:date>2015-07-30T10:29:45Z</dc:date>
    </item>
    <item>
      <title>While JS does not itself</title>
      <link>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032191#M42514</link>
      <description>&lt;P&gt;While JS does not itself support pre-processing, there are lots of preprocessing tools that can remove debug code, comments, etc. &amp;nbsp;Checkout UglifyJS, &amp;nbsp;Browserify, &amp;nbsp;Sweet.js and Google "Javascript minification". &amp;nbsp; &amp;nbsp;You'll probably also encounter Grunt and Gulp.&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	One or more of these tools will do what you need. Sweet.js is the most powerful, and is probably way more than you need, and difficult. &amp;nbsp;UglifyJS is straightforward and very popular. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Good luck,&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 16:13:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032191#M42514</guid>
      <dc:creator>Chris_P_Intel</dc:creator>
      <dc:date>2015-07-30T16:13:16Z</dc:date>
    </item>
    <item>
      <title>Thanks Chris this is really</title>
      <link>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032192#M42515</link>
      <description>&lt;P&gt;Thanks Chris this is really helpful,&lt;/P&gt;

&lt;P&gt;I looked at UglifyJS and the dead_code flag will do the job.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;How do I do this in XDK? My intuitive idea is to make a script that runs UglifyJS and saves the output in&amp;nbsp;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;a parallel project. Then I test the parallel project. Is this the way?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2015 08:06:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032192#M42515</guid>
      <dc:creator>Thomas_V_1</dc:creator>
      <dc:date>2015-07-31T08:06:04Z</dc:date>
    </item>
    <item>
      <title>We don't have a good way to</title>
      <link>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032193#M42516</link>
      <description>&lt;P&gt;We don't have a good way to do it automatically for you, something like what you are describing could work. There has been talk of adding some scripts directories as part of the project that could be used for such tasks, but that has only been discussion, no commitment at this point.&lt;/P&gt;

&lt;P&gt;One guy described in another thread that he keeps two source directories in the project, for example: "dev" and "www" He does his main work in "dev" and then runs scripts that convert and copy his files for production into the "www" directory. He has to change the "source directory" option on the Projects tab to switch between the two setups. See this image for a location of the option that allows you to switch the tag. You have to push the folder icon to make the change.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7774iD5101697B5A968DD/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" title="Screen Shot 2015-07-30 at 7.57.02 AM.png" alt="Screen Shot 2015-07-30 at 7.57.02 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Sat, 01 Aug 2015 00:37:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/preprocessor-ifdef/m-p/1032193#M42516</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2015-08-01T00:37:28Z</dc:date>
    </item>
  </channel>
</rss>

