From 29cd5a8a7010aee9790ab0ce32fe6874dc16caf7 Mon Sep 17 00:00:00 2001 From: Seren Kwok Date: Tue, 26 Sep 2023 17:05:59 -0600 Subject: [PATCH 1/2] add --- CONTRIBUTING.md | 32 ++++++++++++++++++++++++++++++++ README.md | 12 ++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6ab1c87 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributor Guide + +## Getting started + +Make sure you have the Grit CLI installed: + +```sh +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](https://app.grit.io/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. + +```sh +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0835977 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# JavaScript Grit Patterns + +This repository contains curated Grit patterns for JSON. + +## License + +This repository is licensed exclusively for usage with the Grit tool. +All rights reserved. + +## Contributing + +We welcome contributions from the community. Please see the [contributing guide](CONTRIBUTING.md) for more information. From dc556b13c427d88e419082debddc4fbc12d1deff Mon Sep 17 00:00:00 2001 From: Seren Kwok Date: Tue, 26 Sep 2023 17:06:10 -0600 Subject: [PATCH 2/2] it's json --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0835977..6ed6f6c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# JavaScript Grit Patterns +# JSON Grit Patterns This repository contains curated Grit patterns for JSON.