Skip to content

larsschwarz/friendlycode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

This is a friendly HTML editor that uses slowparse and hacktionary to provide ultra-friendly real-time help to novice webmakers.

Prerequisites

Using Friendlycode doesn't actually require anything other than a static file server like Apache. However, if you want to generate optimized builds and run the test suites, you'll need node 0.8+, npm 1.1+, and phantomjs 1.7+.

Quick Start

git clone --recursive git://github.com/mozilla/friendlycode.git
cd friendlycode
npm install
npm test

To run a simple built-in static file server from the repository's root directory, run:

node bin/server.js

Examples

You can see a trivial embedding at:

http://localhost:8005/examples/bare.html

By default, friendlycode doesn't allow JS. An example of an embedding that allows JS and publishes using an alternate API is here:

http://localhost:8005/examples/alternate-publisher.html

Localization

Before localizing, please read the requirejs i18n bundle documentation.

To create a localization, first run node bin/build-i18n.js list to display a list of i18n bundle modules that can be localized. You'll need to localize all of these to create a complete localization, but anything you don't localize will just fall-back to English.

Suppose you decide you want to localize the fc/nls/ui module to fr-fr. Just do the following:

  1. Create the js/fc/nls/fr-fr directory if it doesn't already exist.
  2. Run node bin/build-i18n.js template fc/nls/ui > js/fc/nls/fr-fr/ui.js.
  3. Localize the strings in js/fc/nls/fr-fr/ui.js.
  4. Edit js/fc/nls/ui.js and add "fr-fr": true to the object being returned by the module.

You can test out your localization by setting your browser's language preference to fr-fr and then loading any embedding of your repository's friendlycode widget in your browser.

Updating CodeMirror

In the vendor/codemirror2 directory is a mini-distribution of CodeMirror which contains only the files necessary for HTML editing. It can be updated with the bin/update-codemirror.py script.

Releases

No releases published

Packages

No packages published