Skip to content

Latest commit

 

History

History
102 lines (75 loc) · 3.13 KB

CONTRIBUTING.md

File metadata and controls

102 lines (75 loc) · 3.13 KB

Contributing to Draggable

Thank you for contributing to draggable 🎉 Any contributions to draggable are appreciated and encouraged.

Table of contents

  1. Code of Conduct
  2. How to contribute
    1. Creating issues
    2. Opening pull requests
    3. JS Docblocks
  3. How to run locally
  4. Additional information

Code of Conduct

This project and everyone participating in it is governed by the Code of Conduct document. By participating, you are expected to uphold this code. Please report unacceptable behaviour to max.hoffmann@shopify.com or curtis.dulmage@shopify.com.

How to contribute

Creating issues

Before submitting issues, please have a quick look if there is an existing open issue here: Issues. If no related issue can be found, please open a new issue with labels: bug, documentation, feature-request or question.

Opening pull requests

Pull requests are more than welcome! Just make sure that to include a description of the problem and how you are attempting to fix the issue, or simply follow the Pull Request description template.

We also require Pull Requests to sync with master via rebase (not merge). So when you need to sync up your branch with master use: git pull --rebase origin master, or if you need to sync up with another branch git pull --rebase origin some-other-branch-name. Doing so will remove of an extra merge commit in the git history. This will also require a force push to the branch, e.g. git push -u origin +some-branch. The + in the last command indicates that you are force pushing changes.

Additionally we require commits to be atomic and squashed where needed. This will keep the git history clean on master. To squash commits use the git rebase -i @~2 command to do an interactive rebase. This will allow you to merge multiple commits into one. To read up more on this please visit: Git Tools Rewriting History

JS Docblocks

Please follow the libraries convention and use docblocks to document the code

Here are some sample docblocks for different types (methods, properties, constants, classes, constructors):

/**
 * Some method description
 * @param {ParameterType} parameterName
 * @return {ReturnType}
 * @private
 * @static
 * @readonly
 */

/**
 * Some instance property description
 * @property {PropertyType} propertyName
 * @private
 * @static
 * @readonly
 */

/**
 * Some constant description
 * @const {ConstType} constName
 */

/**
 * Some class description
 * @class ClassName
 * @module ClassName
 * @extends BaseClassName
 */

/**
 * Constructor description
 * @constructs ClassName
 */

How to run locally

Here some steps to run draggable locally:

via yarn

$ cd draggable
$ yarn install
$ yarn test

via npm

$ cd draggable
$ npm install
$ npm run test

We are still working on setting up interactive example pages.