This is a generic app framework with polymer ui elements that can run as a standalone webpage, an android app, or an ios app.
This demo provides basic application scaffolding using polymer.
In addition to
- Clone this repo and delete the .git directory
- Update the application name in bower.json and package.json
- Follow the steps below to get the boilerplate app working.
- run
npm install -g yo
to install yo, grunt-cli and bower - run
npm install -g cordova
to install the cordova mobile utility - run
export PATH=/usr/local/share/npm/bin:$PATH
to ensure command line access to modules.
- run
npm install
to initialize node modules - run
bower install
to initialize bower dependencies - run
grunt build
to build the "dist" directory - run
grunt cordova
to build the cordova directory
Run this the first time, and any time after you make modifications to the app
directory.
- run
grunt cordova
to initialize the platforms directory with ios and android applications
- grunt serve --platform=ios
The android app can be run in an emulator, which can be installed with brew
- run
brew install android
to install the android toolkig - run
android
to download packages and set up an avd device.
To run the android on an emulator or connected device
- Attach an android device in debug mode, or run the android avd emulator.
- if you are running on a connected device you can verify first with
adb devices
cd cordova
- run
cordova run android
TODO
The ios app can be run in an emulator, which can be installed via xcode. It can only be installed on devices with a valid provisioning profile, which requires a paid apple developer account.
To run on a emulator
cd cordova
- run
cordova emulate ios
To run on a connected device (requires provisioning)
- run
cordova run ios
- Run Xcode
- Open
./platforms/ios/*.xcodeproj
- Click Run
- At the command line run
defaults write com.apple.Safari IncludeDebugMenu 1
(you only need to do this once) - Launch the app in the emulator
- Launch safari
- Connect to the Iphone Simulator in the Develop menu
- Find a module with
bower search <search term>
- Install it and save it to your bower.json file with
bower install <javascript module> --save
README.md
This filebower.json
A list of all json dependencies. Do not modify directly.
Add new dependencies withbower install <dependency name> --save
app/
All of the actual content of the app is contained in this directory
dist/*
Stores the intermediate minified and cleaned files before they are compiled to cordovacordova/*
Stores the generated cordova applications for ios and androidnode_modules/*
These files are generaetd by npm installapp/bower_components/*
These files are generated by bower install