In order to contribute to this repository please read the following guide.
To create a new component run the following script:
npm run create:component NewComponent
This will create a new folder with all relevant files. The initial version will be 1.0.0-alpha.1
.
Component structure
project
│
└───components
│ │
│ └───NewComponent
│ │ index.js
│ │ package.json
│ │ README.md
│ │
│ └───src
│ │ NewComponent.js
│ │
│ └───example
│ │ NewComponent.example.js
│ │
| └───test
| │ NewComponent.spec.js
│
└───themes
│ │
│ └───<theme version>
│ └───less
│ └───components
│ └───newcomponent.less
Additional information about the component is stored in the package.json
inside the component folder.
Following sections should be maintained.
{
"contributors": [
{
"name": "Your Name",
"email": "[email protected]"
}
],
"liveExamples": {
"xxx": "https://xxx.com"
}
}
Initially the component starts with a prerelease version (alpha
). You can build a committee consisting of developers and ux/design people, who are managing the lifecycle and development process. The committee decides when components get promoted to new stages, for instance from alpha
to beta
.
A component lifecycle in general could be described as the following:
alpha
indicates a new component in the repository. It might be already used in production, but it was not adopted yet by others. You can use analpha
at your own risk as it is still in development and might have breaking changes.beta
components are adopted by more than one team (and also used in production). It is an approval phase in which bug fixes and improvements still can happen.stable
is the final stage of a component after it has been approved by the committee. Users ofalpha
andbeta
stages are asked to upgrade tostable
.
- Create a new branch from development. As branch name use the next version, for instance
git checkout -b pagination-1.0.0-alpha.2
- Commit your changes
- Create a merge request to development
- Ask for a code review
- Merge your code when you received at least one +1
We use lerna to publish components to the registry. The build and publishing process is not finalized and therefore not implemented yet. The main steps of the process are:
- Merge feature branch to development
- Create a release branch from development
npm run release start
creates release branch and generates changelog
- Bump package versions
npm run publish:components
bumps the version, publishes the updated packages to the registry and creates and pushes a git tag
- Merge release branch to master and development