From 95cc65d3f4745ed283fc3cc0e084ac513b5f7efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Mon, 18 Jun 2018 12:04:00 +0200 Subject: [PATCH 1/5] docs(contributing): Add contributing guide --- CONTRIBUTING.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..8dbc6349f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing to Create InstantSearch App + +Thank you for wanting to get involved in Create InstantSearch App! + +The goal of the package is to enable users to create InstantSearch applications quickly. + +## Workflow + +### Filing issues + +Creating issues, either for reporting a bug or asking for a new feature is always great. [When doing so](https://github.com/algolia/create-instantsearch-app/issues/new/choose), you'll get asked what kind of issue you want to create. Each of these templates will help you create an effective report. + +### Contributing to the code + +Code contributions are always welcome, although you should make sure to [open an issue](https://github.com/algolia/create-instantsearch-app/issues/new/choose) to notice us what you plan to do. + +You will need to follow these steps: + +- [Fork the repository](https://help.github.com/articles/fork-a-repo/) +- Clone the project: `git clone https://github.com/algolia/create-instantsearch-app.git` +- Install the dependencies: `yarn` +- [Create a new branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/#creating-a-branch) + - `fix/issue-number` for a fix + - `feat/name-of-the-feature` for a feature + - `docs/what-you-changed` for documentation +- [Create a pull request](https://help.github.com/articles/creating-a-pull-request/) + +We will then review your pull request! + +### Releases + +- [Generate a new GitHub token](https://github.com/settings/tokens/new) with the scope `repo` (necessary for creating GitHub releases) +- Store this token in an [environment variable](https://en.wikipedia.org/wiki/Environment_variable) +- Make sure you're on the `master` branch +- Run commands (do not use `yarn` for releasing): + - `npm run release:beta` for a new beta version + - `npm run release` for a new stable version +- Follow the command-line instructions + +## Conventions + +### Commits + +This project follows the [conventional changelog](https://conventionalcommits.org/) approach. +This means that all commit messages should be formatted using the following scheme: + +``` +type(scope): description +``` + +These commits are then used to generate the [changelog](CHANGELOG.md). + +## Core concepts + +### Creating a template + +When [creating a template](README.md#templates), you will need to run end-to-end tests (`yarn run test:e2e:templates`) to update all the [snapshots](https://facebook.github.io/jest/docs/en/snapshot-testing.html). These snapshots are meant to avoid regressions that can potentially happen when we unintentionally update a behavior in the source code. + +--- + +Thank you for contributing! From a530bb84293523655fd13cfb6dd3a4644d32180f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Mon, 18 Jun 2018 12:41:03 +0200 Subject: [PATCH 2/5] docs(contributing): Add requirements --- CONTRIBUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8dbc6349f..b9f113aa2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,11 @@ Thank you for wanting to get involved in Create InstantSearch App! The goal of the package is to enable users to create InstantSearch applications quickly. +## Requirements + +- [Node](https://nodejs.org) ≥ 8 +- [Yarn](https://yarnpkg.com) + ## Workflow ### Filing issues @@ -41,8 +46,7 @@ We will then review your pull request! ### Commits -This project follows the [conventional changelog](https://conventionalcommits.org/) approach. -This means that all commit messages should be formatted using the following scheme: +This project follows the [conventional changelog](https://conventionalcommits.org/) approach. This means that all commit messages should be formatted using the following scheme: ``` type(scope): description From 949db549f101f144f0838d6b4c0d6260712fb577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Mon, 18 Jun 2018 12:51:14 +0200 Subject: [PATCH 3/5] docs(contributing): Add folder structure --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b9f113aa2..ca9284529 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,30 @@ Thank you for wanting to get involved in Create InstantSearch App! The goal of the package is to enable users to create InstantSearch applications quickly. +## Core concepts + +### Folder structure + +``` +▸ src + ▸ api The source code of the module `createInstantSearchApp()` + ▸ cli The source code of the CLI `create-instantsearch-app` + ▸ tasks The tasks of the app generation lifecycle + ▸ templates The official templates supported + ▸ utils The utility functions for the package +▸ scripts The end-to-end tests and release scripts + CHANGELOG.md + CONTRIBUTING.md + LICENSE + README.md + index.js + package.json +``` + +### Creating a template + +When [creating a template](README.md#templates), you will need to run end-to-end tests (`yarn run test:e2e:templates`) to update all the [snapshots](https://facebook.github.io/jest/docs/en/snapshot-testing.html). These snapshots are meant to avoid regressions that can potentially happen when we unintentionally update a behavior in the source code. + ## Requirements - [Node](https://nodejs.org) ≥ 8 @@ -28,6 +52,11 @@ You will need to follow these steps: - `fix/issue-number` for a fix - `feat/name-of-the-feature` for a feature - `docs/what-you-changed` for documentation +- Apply your changes +- Run tests: + - `yarn lint` + - `yarn test` + - `yarn test:e2e` - [Create a pull request](https://help.github.com/articles/creating-a-pull-request/) We will then review your pull request! @@ -54,12 +83,6 @@ type(scope): description These commits are then used to generate the [changelog](CHANGELOG.md). -## Core concepts - -### Creating a template - -When [creating a template](README.md#templates), you will need to run end-to-end tests (`yarn run test:e2e:templates`) to update all the [snapshots](https://facebook.github.io/jest/docs/en/snapshot-testing.html). These snapshots are meant to avoid regressions that can potentially happen when we unintentionally update a behavior in the source code. - --- Thank you for contributing! From ba1785dd4acdbc623d75f2e885c367c6db593bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Mon, 18 Jun 2018 12:52:43 +0200 Subject: [PATCH 4/5] docs(contributing): Add introduction to concepts --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ca9284529..9a89b5003 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,6 +6,8 @@ The goal of the package is to enable users to create InstantSearch applications ## Core concepts +The `create-instantsearch-app` CLI is based on the module `createInstantSearchApp(path, options?, tasks?)`. + ### Folder structure ``` From 4eb2fb2b477bffdd62ddfb7274c05c7ebb09e53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Mon, 18 Jun 2018 12:57:10 +0200 Subject: [PATCH 5/5] docs(contributing): Update GitHub environment variable name --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a89b5003..3bfb2d7a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,7 @@ We will then review your pull request! ### Releases - [Generate a new GitHub token](https://github.com/settings/tokens/new) with the scope `repo` (necessary for creating GitHub releases) -- Store this token in an [environment variable](https://en.wikipedia.org/wiki/Environment_variable) +- Store this token in an [environment variable](https://en.wikipedia.org/wiki/Environment_variable) called `GITHUB_TOKEN_CISA` - Make sure you're on the `master` branch - Run commands (do not use `yarn` for releasing): - `npm run release:beta` for a new beta version