Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Popcorn Authoring Library
JavaScript
branch: t1456

This branch is 11 commits ahead, 1424 commits behind mozilla:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
cornfield
css
dialogs
editors
external
resources
src
templates
test
tools
.gitignore
.gitmodules
.jshintrc
LICENSE
LICENSE_HEADER
README.md
changelog
make.js
package.json

README.md

Butter

An SDK for authoring Popcorn projects.

Supported Platforms

We're writing Butter so that it runs in modern, HTML5 compatible browsers. For version 1.0, we're targeting modern HTML5 desktop browsers. In the current version we are supporting:

Desktop (Windows, OS X, Linux):

  • Firefox stable
  • Chrome stable

Build Prerequisites

  • node v0.6 or higher
  • npm (comes with node v0.6 installer)

Using Butter with Cornfield

In order for Cornfield to operate correctly ( being able to save, load, and publish ) you will need to install mongodb. You can find a good guide to do so here. Before starting up you Cornfield server be sure that you have MongoDB running or else it will fail to start.

Environment Setup

  1. git clone --recursive https://github.com/mozilla/butter.git
  2. cd butter
  3. npm install
  4. node make server

When updating your repo, make sure to run node make submodules to update Butter's submodules.

Running Butter (with cornfield)

  • To use butter be sure to start the node server by running node make server.
  • Navigate to http://localhost:8888/templates/test.html to begin using Butter
  • Stylus files will be compiled at run-time through a node module, so no pre-compile of butter.ui.css is necessary

Running Butter (without cornfield)

  • Be sure to have a webserver of some sort running and navigate to butter/templates/test.html ( keep in mind you will not be able to save and load projects )
  • Run node make to ensure all of the CSS has been compiled, since Stylus files are used in place of plain CSS
  • If you do not have a webserver setup you can create a temporary one by running python -m SimpleHTTPServer 8888 inside the root of your Butter directory
  • Navigate to localhost:8888 to use butter

Packaging and Distributing Butter

The 0.5.2 release is being done to support Mozilla's Storycamp project--a set of summer workshops using Popcorn and Butter.

Running node make storycamp will compile all the necessary files into the dist/ folder, including resources like editors and dialogs which comprise a complete running environment for Butter.

Within dist/ you will find src/butter.js and external/popcorn-js/popcorn.js, which are single-file versions of the Butter and Popcorn.js sources, customized to the storycamp templates. You can find these templates in dist/templates/supported.

Testing

Before contributing a new patch be sure to run the following:

  • node make check to lint butter
  • run the qUnit tests in the test/ directory to be sure you broke nothing

Documentation

Documentation can be created from the source files by running node make docs. Running this command will create /doc and fill it with markdown files corresponding to documentation found within the source.

Getting Involved

We have an active irc community on irc.mozilla.org in the #popcorn channel, as well as a mailing list that you can subscribe to https://groups.google.com/group/web-made-movies-working. Come say hi!

Contributing

  • To file a bug or feature request, please use our issue-tracking lighthouse project: https://webmademovies.lighthouseapp.com/projects/65733-butter/
  • When contributing code, please issue a pull request on github, so that we can track changes with comments. Be sure to put a link to the pull request in any corresponding lighthouse tickets.
  • Be sure to change the ticket state on lighthouse to "peer-review-requested" and assign to to one of the core developers for review
  • We have a bot that can run tests on code within pull requests. Try typing /botio check for linting, /botio preview to run the server, or /botio help for a list of all commands.

Known Issues

Vimeo and SoundCloud, while working in this version, have issues that kept us from formally supporting them. We are targeting these for a future release.

Something went wrong with that request. Please try again.