Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.11 KB

CONTRIBUTING.md

File metadata and controls

32 lines (21 loc) · 1.11 KB

Contributor Guide

Getting started

Make sure you have the Grit CLI installed:

npm install -g @getgrit/launcher

To propose changes, fork this repository and open a pull request.

Adding a new pattern

All patterns require at least one sample validating the functionality. As a result, the best way to develop a GritQL pattern is often by starting with before and after sample(s) of the code to be transformed. You can iterate in the GritQL studio to develop your pattern.

Once you have a pattern, you can add it to the repository by creating a new .md file in the .grit/patterns directory. The file name should be the snake-cased name of the pattern. Keep the file name short and descriptive, and add a concise description as well as any relevant tags. All PRs must contain at least one sample of before/after code with a descriptive name.

Testing

Samples can be tested locally using the Grit CLI.

grit patterns test

Once you have your sample(s) passing locally, creating a PR will automatically trigger a CI build running the same tests in a range of environments.