This document aims to normalize and maintain high quality repositories for the Motorcycle.js project.
-
Make a new directory with the name of your new repository and navigate to the directory:
mkdir repo-name && cd $_
-
From CLI, issue:
git init
-
Create a README.md file with a title and description of the repository.
-
Add README.md to git:
git add -A
-
Make your first commit:
git commit -m "docs(README): initial commit"
-
Tag the commit:
git tag -f v0.0.0
-
Create a development branch:
git checkout -b develop
-
On Github, choose New repository.
-
Enter the name of the new repository.
-
Enter a short description.
-
Choose Create repository.
-
From CLI:
git remote add origin https://github.com/user/repo.git git push origin --all git push origin --tags
-
Go to Travis CI and enable the new repository.
-
Under settings, enable Build only if .travis.yml is present.
-
On Github, navigate to the new repository and choose Settings > Branches.
-
Change Default branch from master to develop and choose Update.
-
Under Protected branches, choose master branch.
-
Check Protect this branch.
-
Check Require status checks to pass before merging.
-
Choose Save changes.
-
Download gh-label.sh bash script, and run it. This will create the appropriate labels for the repository. On request, supply the script with your credentials and repository name.
-
Your done! Now, follow the guidelines below.
All repositories included in, or to be considered for inclusion, the Motorcycle.js organization must have proper tests, which cover at least basic usage of the library in question.
Although not a requirement, these tools are recommended for keeping the tooling the same across Motorcycle.js repositories.
- EsLint - Code Style Checking
- Mocha - Test Framework
- Testem - Test Runner
- Assert - Assertions
Every repository must enable continuous integration through Travis-CI with passing builds before consideration of being included into the motorcyclejs Github organization.
Here is a sample configuration for Travis-CI.
All repositories included in Motorcyclejs must use the following to adhere to code style standards:
Optionally:
- babel-eslint - If your project is using ES6 or Babel for transpilation.
Required:
eslint
- for running eslint checkstest
- for running testsstart
- must benpm install && npm prune && validate-commit-msg
release-patch
- for patch releasesrelease-minor
- for minor releasesrelease-major
- for major releases
Optional:
compile
- for running Babel or other compilation stepsprepublish
- should benpm run compile
ifcompile
is neededtest-ci
- for running tests on Travis-CI if thetest
script above will not work for any reason.
Refer to Motorcycle-Core package.json for reference.
All dependencies must be locked down to specific versions to avoid unnecessary developer inconsistencies.
Required Dev Dependencies:
- validate-commit-message : >= 3.0.1 - for
npm start
script
Recommended Dev Dependencies:
- cli-release : >= 1.0.4 - for
release-*
scripts
- Must follow our contributing guidelines.
- Must run this script to provide default issue labels.