Skip to content

jlongster/fireplace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fireplace

Fireplace is a packaged version of the Firefox Marketplace's front-end.

Glossary

Chimney
A bridge between Flue and the actual Zamboni API
Damper
A node.js server that serves a browser-friendly version of Fireplace
Flue
A mocked-out version of the Marketplace API.
Hearth
The source code for Fireplace.
Inferno
A build server which generates a packaged version of the Marketplace.
Yule Log
A fake version of Fireplace to provide the Gaia team with a package that can be shipped and later upgraded to the real Fireplace.

Installation

npm install -d

Our dependencies:

  • nunjucks: For templates
  • stylus: For stylesheets

If you plan on doing compilation (i.e.: you're Wil Clouser), you'll also need

  • clean-css: For minifying CSS or whatever
  • requirejs: For warming up Spaceheater
  • uglify-js: For minifying JS and L10n string extraction

Flue

Comprehensive Flue documentation can be found in Flue's README.

Getting node/npm

OS X

brew install node

And make sure that /usr/local/share/npm/bin is in your $PATH, à la: ::

export PATH=/usr/local/share/npm/bin:$PATH

Usage

From the terminal, run the following command

node damper.js

This will start a local server on 0.0.0.0:8675 by default.

To control the hostname and port you can use the following otions

node damper.js --host 127.0.0.1 --port 8888

In addition to an HTTP server, the damper will also run a Stylus watcher (to recompile CSS as it's edited) and a template watcher (to recompile templates as they're edited).

For instructions on running Flue (the mock API server), please see the Flue docs.

Compiling

To run the compilation process, which compiles templates, CSS, and locale files, run the damper with the --compile argument:

node damper.js --compile

The damper will not start a local server in this case, but a strings.po file will be generated.

Localizing

A detailed guide to extracting strings and creating JS language packs can be found on the wiki.

The API

Read the docs.

Bugs

  • If new templates or .styl files are added, they will not be recognized until the damper is restarted. Deleted files may also cause problems.

Missing Features

  • numberfmt doesn't work (should probably be integrated with L10n pluralization)
  • WebActivity support has not yet been added.

Releases

No releases published

Packages

No packages published