Use Xcode as Javascript IDE, possible? Use Xcode as Javascript IDE, possible? xcode xcode

Use Xcode as Javascript IDE, possible?


I will try and step through the things you should do...

the "debug" config would simply compile the main .less file (which includes all small .less files),

  • I would create a build rule to handle .less files, use a script to compile them.

copy the JS + CSS + HTM file over to some directory (~/Sites/projectX_debug), along with all graphic resources. Then depending on the "sub-configuration" chosen, launch either the iPhone Simulator, the iPad Simulator, Safari, or Chrome, clear its cache (via AppleScript?) and open the index.htm

  • For this you just need to add your files to the copy phase in the 'Build Phases' section.
  • You can set your build directory in your target's 'Build Settings' section (~/Sites/projectX_debug, if you'd like).

the "release" config that would glue all JS files together and minify them, compile and minify the .less file, change the index.htm to reference only the glued JS, then optimize all PNGs with pngout/pngcrush/whatever before sending all the archive to a local directory (~/Sites/projectX_release) or by sftp to my production server.

  • For this part you might want to create a new target and add different rules and settings.

OR

If the above is too complicated:

  1. Write your two bash scripts.
  2. Make two targets.
  3. Add your bash script as a build phase in each target.

Hope that helps.