Random posts about coding

Mostly blogging about dart.

How to Publish Dart to Chrome Web Store for ChromeOS via Github

Document explains at a high level how to publish Dart apps to Chrome Web Store for Google ChromeOS via Github. This application targets ChromeOS, so it was compiled to javascript. Example code was taken directly from dart source tree for testing. Thanks to +Terry Lucas for the code!

1) Chrome Web Store needs the distribution site to be verified, this can be done by adding a site via webmaster tools. Using github’s ability to publish to a subdomain on github.com this is easy to accomplish.





2) We create a github project that will contain published gh-pages and a zipped manifest for hosted app distribution via Web Store.
$ git clone git@github.com:financeCoding/dart-calculator.git
$ cd dart-calculator

Export the calculator project
$ svn export –force http://dart.googlecode.com/svn/branches/bleeding_edge/dart/samples/calculator/ .

Modify the manifest uri to the github location

Build the templates and javascript code. Package the manifest and icon image into a zip folder so Chrome Web Store can publish it.

$ export PATH=$PATH:~/dart_bleeding/dart/out/Debug_ia32/
$ ~/dart_bleeding/dart/utils/template/template calcui.tmpl calcui.dart
$ ~/Documents/DartEditor/dart/dart-sdk/bin/frogc –out=calculator.js calculator.dart
$ mkdir calculator_app
$ cp manifest.json calc_128.png ./calculator_app/
$ zip -vr ./calculator_app.zip calculator_app -x “*.DS_Store”
$ git add .
$ git commit -a -m “adding calculator”

Create the gh-pages so Google Web Store can pull our applications data.
$ git symbolic-ref HEAD refs/heads/gh-pages
$ git add .
$ git commit -a -m “First pages commit”
$ git push origin gh-pages
$ git checkout master

3) Create a web app and fill out all the non optional values, publish to testers.



Comments and suggestions welcome. It was very impressive how quickly one could distribute apps via Chrome Web Store. I think Dart will really win in this respect.