CordovaFirefoxOS: Difference between revisions

Jump to navigation Jump to search
Line 1: Line 1:
This page is to document the development of Cordova for FirefoxOS. It is edited quite often, co
This page is to document the development of Cordova for FirefoxOS. It is edited quite often, co


==General issues==
==Running an early dev version==
<pre>
$ git clone https://github.com/jlongster/cordova-cli.git
$ cd cordova-cli && npm install
$ cd ..
$ git clone https://github.com/jlongster/cordova-plugman.git
$ cd cordova-plugman && git checkout ffos
$ cd ..
$ cd cordova-cli && npm install ../cordova-plugman
$ cd ..
$ git clone https://github.com/jlongster/cordova-firefoxos.git
</pre>
Create a dir (possibly a bug it should be autocreated or used from another dir)
<pre>$ mkdir -p ~/.cordova/lib/firefoxos/cordova-firefoxos-dev/</pre>
Create your app:
<pre>$ ./cordova-cli/bin/cordova create fxos-app</pre>
You need to tell cordova to use the local firefoxos platform. Do this
by editing .cordova/config.json in the fxos-app folder. Add the "lib"
property, like this:
<pre>
{
    "id": "io.cordova.hellocordova", "name":"HelloCordova",
    "lib": {
        "firefoxos": {
            "uri": "/Users/james/projects/mozilla/tmp/cordova-firefoxos",
            "version": "dev",
            "id": "cordova-firefoxos-dev"
        }
    }
}</pre>
Just change `uri` to make it point to your computer.
Now you can add the platform and add plugins:
<pre>$ ../cordova-cli/bin/cordova platform add firefoxos</pre>
$ ../cordova-cli/bin/cordova plugin addhttps://github.com/jlongster/cordova-plugin-device.git
$ ../cordova-cli/bin/cordova prepare


==API shim development==
==API shim development==
Confirmed users
514

edits

Navigation menu