- Clone this repo (see README.md how to install)
git checkout master
git pull
git checkout -b ticket_featurename
- Commit as normal,
git commit
git push origin ticket_featurename
(makes sure your code is saved on GitHub)- Once your work is ready to share...
git pull
git merge master
- resolve any conflicts
git push
- tests (automated and otherwise)
- Create a pull request on GitHub
Anyone can merge pull requests, but it usually makes sense to have them code reviewed by somebody else, so it's usually a good idea for somebody else to merge your pull requests.
Project has .editorconfig file, we recommend to download extension for your IDE.
- Indentation with 2 spaces
- Beginning brace on the same line as the beginning statement
- File names use dash to separate words. For example: foo-bar.js
- Use camelCase for identifiers. Functions and variable names should be named like
doAThing
, notdo_a_thing
.
- TODO
- Use LESS CSS for CSS.
- Name reusable bits of layouts by module names and keep them out of page styles, (eg.
.group-badge
can be used in multiple places around the site.) - Related elements within a module use the base name as a prefix. For example module
.panel
has also.panel-header
,.panel-body
and.panel-footer
. - Prefix state rules with
.is-
(for example.is-collapsed
).
TODO: Review
Convention is as follows:
- Url has the plural like
/messages/
,/users/
,/users/:userId/photos
,/users/:userId/references
- The id is the singular name followed by
Id
likeuserId
,photoId
, etc - The route with the id is called nameSingle like
usersSingle
,offersSingle
, etc - Template name matches route name
- Nested routes are simply concatenated like
usersSingleReferences
orusersSinglePhotosSingle
Examples
/users
route nameusers
/users/:username
route nameusersSingle
/users/:username/edit
route nameusersSingleEdit
/users/:username/photos
route nameusersSinglePhotos
/users/:username/photos/edit
route nameusersSinglePhotosEdit
/users/:username/photos/:photoId
route nameusersSinglePhotosSingle
/users/:username/photos/:photoId/edit
route nameusersSinglePhotosSingleEdit
/messages
route namemessages
/messages/:userId
route namemessagesThread
- deviates because it isuserId
notmessageId