Labs/Jetpack/JEP/31: Difference between revisions

Jump to navigation Jump to search
→‎Undocumented Features: added info about local.json
(→‎cfx: updated command-line help snippet)
(→‎Undocumented Features: added info about local.json)
Line 217: Line 217:


* Packages can also have a <tt>data</tt> top-level directory that contains arbitrary static content such as HTML, CSS, images, and so forth.  This can be accessed via <tt>packaging.getURLForData()</tt>. An example package can be found [http://hg.mozilla.org/users/avarma_mozilla.com/atul-packages/file/jep-31-examples/packages/proto-jetpack-2/examples/simple here].
* Packages can also have a <tt>data</tt> top-level directory that contains arbitrary static content such as HTML, CSS, images, and so forth.  This can be accessed via <tt>packaging.getURLForData()</tt>. An example package can be found [http://hg.mozilla.org/users/avarma_mozilla.com/atul-packages/file/jep-31-examples/packages/proto-jetpack-2/examples/simple here].
* When compiling XPCOM components or otherwise reusing lots of command-line options, it may be helpful to create a <tt>local.json</tt> file in the root of your checkout and then use the <tt>--use-config</tt> option to specify a configuration in it.  Here's an example <tt>local.json</tt> one might use to make it easier to build binary components for different versions of the Gecko platform:
<pre>
{
  "configs": {
    "mc": [
      "--srcdir", "~/Documents/mozilla-stuff/mozilla",
      "--objdir", "~/Documents/mozilla-stuff/debug-firefox",
      "--binary", "~/Documents/mozilla-stuff/debug-firefox/dist/bin/firefox-bin"
    ],
    "ff36": [
      "--srcdir", "~/Documents/firefox-3.6-stuff/mozilla",
      "--objdir", "~/Documents/firefox-3.6-stuff/basic-firefox",
      "--binary", "/Applications/Firefox.app/Contents/MacOS/firefox-bin"
    ],
    "ff35": [
      "--srcdir", "~/Documents/firefox-3.5-stuff/mozilla",
      "--objdir", "~/Documents/firefox-3.5-stuff/basic-firefox",
      "--binary", "~/Documents/firefox-3.5-stuff/basic-firefox/dist/bin/firefox-bin"
    ]
  }
}
</pre>


* It's possible to use the <tt>--templatedir</tt> option to <tt>cfx</tt> to use a cfx configuration from an existing extension.
* It's possible to use the <tt>--templatedir</tt> option to <tt>cfx</tt> to use a cfx configuration from an existing extension.
874

edits

Navigation menu