Skip to content

Latest commit

 

History

History
72 lines (57 loc) · 3.54 KB

CONTRIBUTING.md

File metadata and controls

72 lines (57 loc) · 3.54 KB

Contributing

Thanks for taking the time to contribute! 🎉 🎊 👍

Getting started

Looking for places to contribute to the codebase? Check out the Status: accepting PRs label.

Installation

First, ensure you have Node v6+ installed on your machine. Run node -v in the terminal to confirm.

As an external contributor (not a member of the Palantir org), you will have to fork Blueprint in order to contribute code. Clone your fork onto your machine and run the following commands to install dependencies:

git clone [email protected]:<username>/blueprint.git # using ssh
cd blueprint
npm install
npm run bootstrap

Developing

A typical contributor workflow looks like this:

  1. Create a new feature branch. We use a format like [your-initials]/[short-name]: bd/refactor-buttons.
  2. Run the development server via gulp (no arguments).
    • Navigate to http://localhost:9000/packages/site-docs/dist/ when the server starts.
    • See Build tasks on the wiki for more details on the inner workings of the Gulp build.
    • If you are contributing to the table or landing packages then run npm start in those directories instead, as they have separate webpack-based development builds.
  3. Write some code. 🔨 Refer to the wiki in this repo for detailed instructions on:
  4. Ensure your code is tested and linted.
    • Add unit tests as necessary when fixing bugs or adding features; run them with gulp test.
    • Linting is best handled by your editor for real-time feedback (see Editor integration). Run gulp check to be 100% safe.
  5. Submit a Pull Request on GitHub.
    • Write a thorough description of your work so that reviewers and future developers can understand your code changes.
  6. Team members will review your code and merge it after approvals.
    • You may be asked to make modifications to code style or to fix bugs you may have not noticed.
    • Please respond to comments in a timely fashion (even if to tell us you need more time).
  7. Hooray, you contributed! 🎩

Enable preview comments

The team relies on PR "preview comments" for immediate feedback on features during development. Forkers must manually enable comments by defining the GH_AUTH_TOKEN environment variable on CircleCI.

If you're developing on a fork of Blueprint:

  1. Navigate to CircleCI, log in using your GitHub account, and click "Build project" for your fork of Blueprint.

  2. Navigate to the token settings on GitHub and create a user token with the public_repo scope.

  3. Navigate to your CircleCI repo settings: https://circleci.com/gh/<username>/blueprint/edit#env-vars and create a new environment variable called GH_AUTH_TOKEN with the token you created earlier. The end result should look like so:

    image

  4. When a build passes, a comment will be automatically posted to your PR that links to the generated artifacts containing your changes.