Breakpoints
Github

Docs

Coding

Coding Conventions and Guidelines

Coding conventions:

Sass conventions:

Contributing

Contributing to Dress Code

Git workflow

The git workflow that we use to contribute is mostly based and well explained in this article: a-successful-git-branching-model

Main branches:

If a github issue is related to a branch we suggest to append the number at the end of the branch name.
example: topic/dropdown-refactor-98

Git Commit Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. It is important to note that we use the git commit messages to generate the Dress Code Changelog document.

A detailed explanation of guidelines and conventions can be found in this document.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

Any line of the commit message cannot be longer 100 characters!
This allows the message to be easier to read on github as well as in various git tools.

Type

Must be one of the following:

Scope

The scope could be anything specifying the place of the commit change.

Subject

The subject contains succinct description of the change:

Body

Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes" The body should include the motivation for the change and contrast this with previous behavior.

Footer

The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes.

Breaking Changes are intended to highlight (in the ChangeLog) changes that will require community users to modify their code with this commit.


Sample Commit message:

refactor(button): prefix btn class with dc-

    BREAKING CHANGE: btn class now is prefixed with dc namespace.

    Change your code from this:

    ```html
    <button class="btn">submit</button>
    ```

    To this:

    ```html
    <button class="dc-btn">submit</button>
    ```

Releasing

RELEASING

Step by step instructions to release a new version of the dress-code.

  1. From the develop branch, move into a new release branch. The <semver> placeholder stay for a new semantic version (e.g. 0.4.1). For more info, please take a look here.
git checkout -b release/<semver>
  1. Run the build.
npm run build
  1. Increase bower.json and package.json version and run the task that updates the changelog.
npm run changelog
  1. Check the result and if needed adjust the output (CHANGELOG.md). When done, commit the changes and push the release branch.
git add --all;
git commit -m "chore(release): <semver>";
git push -u;
  1. Wait the CI job running on Travis.

When the CI job pass with SUCCESS, merge or rebase the release branch on top of the master branch.

git checkout master;
git pull;
git rebase release/<semver>; # or open a pull request to master
  1. Add a git tag, push the master branch and the new tag.
git tag -a <semver> -m "<semver>";
git push origin master;
git push origin <semver>; # push the tag
  1. Build and deploy demo docs/demo artifacts.
npm run deploy:demo;
  1. Publish on npm registry.
npm publish
  1. Keep in sync the develop branch.
git checkout develop;
git rebase master; # or git merge
git push origin develop;