mobile-chromeapp-starter-kit
v1.2.2
Published
Mobile Chrome Apps Starter Kit is Yet Another Opinionated Boilerplate for Chrome Apps development
Downloads
4
Maintainers
Readme
Mobile Chrome Apps Starter Kit
Mobile Chrome Apps Starter Kit is Yet Another Opinionated Boilerplate for Chrome Apps development. "Helping you to stay productive following the best practices. A solid starting point for both professionals and newcomers to the industry." - google/web-starter-kit
Issues with the output or build should be reported on the Mobile Chrome App
issue tracker or Polymer Starter Kit
issue tracker.
Setup
Install Mobile Chrome Apps and Android or iOS SDKs. Please refer to Install guide of Mobile Chrome Apps for further information and then please make sure that your development environment can use
cca checkenv
. You will get a message like below if you have no problem to usecca
cca v0.x.x Android Development: SDK configured properly. iOS Development: SDK configured properly.
Update some of properties of package.json which might be related to your project such as
name
,appId
,description
,repository
andauthor
, will be used to updateconfig.xml
for Cordova project.
{
"name": "mobile-chromeapp-starter-kit",
"appId": "com.your.appid2",
"description": "Mobile Chrome Apps Starter Kit is Yet Another Opinionated Boilerplate for Chrome Apps development",
"author": {
"name" : "Jimmy Moon",
"email" : "[email protected]",
"url" : "http://ragingwind.me"
},
"repository": "ragingwind/mobile-chromeapp-starter-kit",
}
- Run those commands to install dependencies for npm and bower
npm install && npm run setup
After installing npm packages by npm install
, postinstall
script will be started as soon, to install the rest of npm packages and download some of patches from github to update PSK source files such as gulpfile.js
, route.html
and app.js
. And then npm run setup
command will execute setup command of cca
to set up Cordova project, during this time, properties of package.json will be used for.
Build and Run
To build and run application. First, get into src
path first.
cd src
Next, build your PSK project by gulp on src
gulp
, and then run the app on particular platform what you want to
gulp cca:run --platform=chrome
, or for Android.
gulp cca:run --platform=android
Extra gulp commands for Cordova(CCA)
This project has extra gulp commands to build and run Cordova(cca) project, which is in the src/tasks
. Please refer to commands below
gulp cca:build
: build application and then build Cordova project.platform
should be passed for build,--platform=android
. At this moment, we only support build for androidgulp cca:run
: run cordova project on emulate or devices. use options with--platform=chrome|android
and--run=emulate|device
gulp cca:push
: runcca push
command on theplatform
path. You should give target with ip address, with target option--target=192.168.0.10
and--watch
culp cca:package
: Make and copy a unsigned zip file for Chrome and apk of Android topackage
path. It should be run afterbuild
Please visit reference sites if you want to know further details of cca build commands.
Clean or reset
If you would like to clean, reset the project to start at begin again? you can use clean-up command for npm. run below command stay on project file root. WARNING, it will remove all of files what you created after installing and setup.
npm run reset
Mobile Chrome Apps
We use pre-created Cordova project for Mobile Chrome App, that means you need to update a few of configurations to fit your application what you want. During first installation time of the cca project will be configured with properties of package.json, such as application id, name or version. We are using handy script command, cordova-config-cli allow you to set a new value to config.xml. If you would like to update more configurations please see cordova-config-cli for more information
Migrations for Polymer Starter Kit (PSK)
We use final released the full version of PSK as default application. After downloading PSK, we have to have some of changes from PSK through npm postinstall
to fit in Chrome Apps following the recipe. Please see below what will be changed.
- at
gulpfile.js
, Changedist
path, Update vulcanize task - at
app/scripts/app.js
, Change base path - at
app/elements/routing.html
, Update default route - at
app/bower_components/font-roboto/roboto.html
,link
will be replace to@import
Known Issues
- Tested on Mac OS X with Android and chrome only except iOS
- Some of files should be removed before build and release to App store in manually. For example
manifest.json
,.gz
- All of features of Polymer Starter Kit has not been tested yet
- Failed to route
home
at starting the application on Android's emulator/device
License
MIT @Jimmy Moon