Skip to content

Latest commit

 

History

History
207 lines (135 loc) · 4.51 KB

CONTRIBUTING.md

File metadata and controls

207 lines (135 loc) · 4.51 KB

Contributing Guide

Almin uses Yarn for running development scripts. If you haven't already done so, please install yarn.

Environment

  • Node.js >= 6.0.0
  • Yarn

Bootstrap

First, you should install all dependencies by following:

# In project root
yarn install

Almin repository is monorepo top on lerna. postinstall life-cycle script automatically run yarn run bootstrap that install all deps/devDeps.

How to contribute?

You can find suitable issues to contribute on Issues label:good first issue.

Of course, welcome to fix the other issue or file issue.

Basic Pull Request steps:

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

How to run tests?

Run all tests that includes examples in Node.js:

yarn test
# It includes unit test/example test

You can only run unit test:

cd packages/almin && yarn test
# or
yarn test -- --scope almin

Run unit tests in Browser:

cd packages/almin && yarn run test:browser

How to fix document?

Contribute to fix documents

  1. Fix the issue
  2. Preview documents
cd website
yarn install
yarn start

Welcome to fix documents!

Contribute to fix API Reference

API Reference is automatically generated from source code(`/src/*.ts``)

  1. Fix the comment of source code
  2. Build API Reference
yarn run build:docs:api # build

How to write document?

  1. Add Markdown document to docs/ directory.
  2. Add link to SUMMARY.md

How to write git commit message?

Almin has adopted Conventional Commits

Conventional Commits

                       component        commit title
        commit type       /                /      
                \        |                |
                 feat(rule-context): add template url parameter to events

        body ->  The 'src` (i.e. the url of the template to load) is now provided to the
                 `$includeContentRequested`, `$includeContentLoaded` and `$includeContentError`
                 events.

 referenced  ->  Closes #8453
 issues          Closes #8454
  • commit type:
    • BREAKING CHANGE: breaking change(major update)
    • feat: add new feature(minor update)
    • fix: fix a bug(patch update)
    • style: format style(patch update)
    • refactor: refactoring(patch update)
    • perf: it is related performance(patch update)
    • test: update tests(patch update)
    • docs: update documents(patch update)
    • chore: the other(patch update)
  • component: package name or file name
    • e.g.) almin, almin-logger

If you commit cross component changes in a pull request, separate commits by component.

Example: commit message

Example: Add new feature – This is minor update

feat(almin): add new feature

Describe in details.

fix #42

Example: Fix a bug

fix(almin): `tryUpdateState` should be called before finished 

Describe in details.

fix #42

Example: BREAKING CHANGE

feat(almin): Change default StoreGroup

BREAKING CHANGE: make `StoreGroup` as default store

fix #42

Release workflow

For maintainer: This document describe release flow for maintainer.

  1. Checkout release branch
git checkout -b release-date
git push origin HEAD -u
  1. Bump version and tag

Run one of following command.

Recommend: yarn run versionup

# automatic versioning by commit message
$ yarn run versionup
# major update for all
$ yarn run versionup:major
# minor update for all
$ yarn run versionup:minor
# path update for all
$ yarn run versionup:patch
  1. Copy Changelog

Copy CHANGELOG.md with the bump tags.

You can copy CHANGELOG related with current release to your clipboard.

$ yarn run copy-changelog
# copy to clipboard
  1. Submit Pull Request

Submit Pull Request and paste the CHANGELOG.

For maintainer: Reviewers should review the CHANGELOG and approve it.

  1. Update Release Notes
  • Update GitHub Release
  • Write blog post if it is needed
  1. Publish to npm

Finally, publish new version to npm by running next command:

$ yarn run release