Node modules for Firefox Marketplace frontend projects
Перейти к файлу
Kevin Ngo 558b5969f4 replace waffle with site config 2014-10-09 18:13:26 -07:00
bin clean bin files 2014-10-07 03:50:55 -07:00
dist replace waffle with site config 2014-10-09 18:13:26 -07:00
lib replace waffle with site config 2014-10-09 18:13:26 -07:00
test wait for server in tests 2014-10-06 19:51:41 -07:00
.gitignore add dist folder to test bower 2014-09-22 10:41:55 -07:00
.jshintignore Add commonplace linter 2013-12-05 23:50:17 +00:00
.travis.yml wait for server in tests 2014-10-06 19:51:41 -07:00
LICENSE Add base files 2013-07-09 15:13:13 -07:00
README.md wait for server in tests 2014-10-06 19:51:41 -07:00
bower.json v0.5.4 2014-10-07 14:22:34 -07:00
package.json v0.5.4 2014-10-07 14:22:34 -07:00

README.md

Commonplace

Reusable components for Firefox Marketplace frontend projects.

Build Status

Adding a Component

Components are stored in the dist directory. There are currently several folders in dist that group the components:

  • contrib: JS modules that aren't necessary, but can be useful for some projects.
  • contrib-css: CSS components that aren't the part of the base styles, but are possibly shared between some projects.
  • core: necessary JS modules that power all of our projects, the Commonplace framework.
  • core-css: base CSS components that ship with every project for visual consistency.
  • core-templates: reusable templates that every project uses
  • contrib-templates: reusable templates that some projects use

Adding a Core JS Component

When adding an integral component that should be distributed to all Commonplace projects, first add the files to dist/core. Then we add the name of the core module to CORE_MODULES in lib/config.js. This will make it so Commonplace projects won't have to manually configure them into their RequireJS configurations.

Updating a Component

When you add or update a component, you presumably want projects to be able to consume that component. We use Bower to manage our components.

  • Bump the version in bower.json.
  • Git tag that version and push to Github.

Then your projects should be able grab the new or updated component from Bower. For Commonplace projects, you can run make update to get these components into your project and into your RequireJS development configuration.

Creating a New Commonplace Project

Clone the Commonplace base template.

Run make init. This will download dependencies from Commonplace via Bower and set up a couple of configurations.

I have questions! Where do I look for more information?

You can check out the Wiki, which has plenty of documentation about the project and the Commonplace framework.