Skip to content

Instantly share code, notes, and snippets.

@alabeduarte
Last active December 25, 2015 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alabeduarte/6965680 to your computer and use it in GitHub Desktop.
Save alabeduarte/6965680 to your computer and use it in GitHub Desktop.
cordova template
#!/bin/sh
npm init
APP="my_app"
COFFEE=$1
LESS=$2
MOBILE_DIR="${APP}/mobile"
WWW_DIR="${MOBILE_DIR}/www"
mkdir $APP
cd $APP
if [ COFFEE ]; then mkdir "app" && mkdir "app/coffee" && npm install coffee-script --save && npm install grunt-contrib-coffee --save; fi
if [ LESS ]; then mkdir "app/less" && npm install grunt-contrib-less --save; fi
cordova create "mobile"
cd -
mv package.json $WWW_DIR
mv -r node_modules/ $WWW_DIR
cd $WWW_DIR
npm install grunt --save
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment