Contributing to Calcite web
You want to contribute? Nice! Below are some guidelines for ensuring that your contribution makes sense for everybody.
Found a problem? Want a new feature?
- See if your issue or idea has already been reported.
- Provide detailed reproduction instructions as well as what behavior is expected.
Submitting Pull Requests
Pull requests are the greatest contributions, so be sure they are focused in scope.
- To begin, fork this project, clone your fork, and add our upstream.
# Clone your fork of the repo into the current directory git clone https://github.com/<your-user>/calcite-web # Navigate to the newly cloned directory cd calcite-web # Assign the original repo to a remote called "upstream" git remote add upstream https://github.com/esri/calcite-web # Install the tools necessary for development npm install
- Create a branch for your feature or fix:
# Move into a new branch for a feature git checkout -b feature/thing
# Move into a new branch for a fix git checkout -b fix/something
- Start up a local development server:
# Use the start script to run the default dev environment npm start
- Be sure your code follows our practices.
# Test current code npm run test
- Push your branch up to your fork:
# Push a feature branch git push origin feature/thing
# Push a fix branch git push origin fix/something
- Now open a pull request with a clear title and description.
Adding a Component
Adding a component to Calcite Web requires a few steps:
docs/source/documentation/components/add a markdown file titled
_[your component name].mdwhich describes your component.
docs/source/documentation/components/sample-code/add an html file containing the markup for your component. Title it
_[your component name].html.
- Add an entry in the components section of
docs/source/table_of_contents.ymlformatted like this:
- title: 'Tooltips' # Human readable headline link: tooltips # Name used for .md and .html files status: ['complete','inprogress','proposed','unplanned',false] # this will set the component status, false will hide from status table hidden: [true] # set 'hidden: true' to hide components from appearing in documentation. Useful for showing in progress components on the status table modifiers: # List of modifier classes. If a component consists solely of the base with no modifiers, set 'modifiers: false' in order to display the component - tooltip-left - tooltip-right - tooltip-top doc_classes: - example-modifier-class # Accepts a list of class names for styling documentation examples
- Run a local server (
npm start) and develop your component
- Add an entry in the
CHANGELOGdescribing your new component.
- Open a pull request!
Bumping the Version
- Change the version number in
package.jsonto the desired version number.
- Write a description of the changes, additions, and bug fixes in
npm run distto make sure the dist files are updated.
- Make sure
Esri/calcite-webis up-to-date with your changes (via Pull Request).
npm run release. If prompted enter your GitHub credentials and your s3 access key/secret.
Updating the Documentation Site
To update the documentation site, just make sure you have push access to the
Esri/calcite-web repo and type
npm run deploy. This will build the site and deploy to gh-pages.
The site should be updated at http://esri.github.io/calcite-web/ in just a few moments.