PhoneGap: automated app building with Grunt, Node, Watch, Sass

After much fiddling around, this is the solution I’ve ended up with that uses Grunt, Node, Watch, and Sass:

  • Install Node:
  • Create a package.json: NOTE: I froze versions of my dependencies. You may want to use ~ instead.
  • Install/update node packages: npm install
  • Create a Sass directory in your www: mkdir www/sass
  • Add an SCSS file in your www/sass
  • Add a Grunt config script:
  • Run Grunt (and it will keep rebuilding any time a change to app.scss or your www/* files happens): grunt
  • Open the Xcode project: open platforms/ios/YourAppProjectName.xcodeproj/
  • Run the iOS simulator