Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 2.07 KB

CONTRIBUTING.md

File metadata and controls

72 lines (52 loc) · 2.07 KB

Contributing to Bradypodion

Prerequisites

After cloning the repository…

git clone [email protected]:excellenteasy/bradypodion.git
cd bradypodion

…you should install global…

npm install -g bower grunt-cli

…and local dependencies.

npm install
bower install

Development

During development you need to run the serve task. It builds and tests the source on change and serves the demo app on http://localhost:9000.

grunt serve

Scripts

Write code that passes our JSHint and JSCS rules. Write comments that describe why you're doing something, rather than what you're doing. Write tests that cover the entire functionality you're adding. Write documentation with @ngdoc.

Styles

The CSS build relies on conventions. For a new module create a folder within modules/styles, like so modules/styles/@{type}/@{name}.

There is a special treatment for files within those folders.

  • module.less: Contains a mixin which is the actual module.
  • class.less: Contains the code that actually causes real CSS output (i.e. calls the module's mixin).
  • @{platform}.less(android|ios): Contains platform specific mixins.

Platforms will be namespaced whenever you build more than one.

So the rules in this imaginary file (modules/styles/@{type}/@{name}/@{platform}.less)…

bg-button {
  background: green;
}

… will look like this, once compiled. bradypodion.css

.@{platform} bg-button {
  background: green;
}

Create and import as many other files within the module's folder as you like, but group them in platform folders.

Whenever you write color related styles make them themeable.