mobile-chromeapp-starter-kit

1.2.2 • Public • Published

Mobile Chrome Apps Starter Kit

Demo for 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

  1. 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 use cca

    cca v0.x.x
    Android Development: SDK configured properly.
    iOS Development: SDK configured properly.
    
  2. Update some of properties of package.json which might be related to your project such as name, appId, description, repository and author, will be used to update config.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" : "ragingwind@gmail.com",
    "url" : "http://ragingwind.me"
  },
  "repository": "ragingwind/mobile-chromeapp-starter-kit",
}
  1. 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 android
  • gulp cca:run: run cordova project on emulate or devices. use options with --platform=chrome|android and --run=emulate|device
  • gulp cca:push: run cca push command on the platform 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 to package path. It should be run after build

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, Change dist 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

Package Sidebar

Install

npm i mobile-chromeapp-starter-kit

Weekly Downloads

4

Version

1.2.2

License

none

Last publish

Collaborators

  • ragingwind