docs: update contributing docs
parent
e1aefbf5b6
commit
e69e39e436
|
@ -4,60 +4,55 @@ We want this community to be friendly and respectful to each other. Please follo
|
||||||
|
|
||||||
## Development Workflow
|
## Development Workflow
|
||||||
|
|
||||||
To get started with the project, make sure you have a local instance of Strapi running.
|
This plugin provides a local development instance of Strapi to develop it's features. We call this instance `playground` and it can be found in the playground folder in the root of the project. For that reason it is not needed to have your own Strapi instance running to work on this plugin. Just clone the repo and you're ready to go!
|
||||||
See the [Strapi docs](https://github.com/strapi/strapi#getting-started) on how to setup a Strapi project.
|
|
||||||
|
|
||||||
#### 1. Fork the [repository](https://github.com/boazpoolman/strapi-plugin-config-sync)
|
#### 1. Fork the [repository](https://github.com/pluginpal/strapi-plugin-config-sync)
|
||||||
|
|
||||||
[Go to the repository](https://github.com/boazpoolman/strapi-plugin-config-sync) and fork it to your own GitHub account.
|
[Go to the repository](https://github.com/pluginpal/strapi-plugin-config-sync) and fork it to your own GitHub account.
|
||||||
|
|
||||||
#### 2. Clone from your repository into the plugins folder
|
#### 2. Clone the forked repository
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd YOUR_STRAPI_PROJECT/src/plugins
|
git clone git@github.com:YOUR_USERNAME/strapi-plugin-config-sync.git
|
||||||
git clone git@github.com:YOUR_USERNAME/strapi-plugin-config-sync.git config-sync
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 3. Install the dependencies
|
#### 3. Install the dependencies
|
||||||
|
|
||||||
Go to the plugin and install it's dependencies.
|
Go to the folder and install the dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd YOUR_STRAPI_PROJECT/src/plugins/config-sync/ && yarn plugin:install
|
cd strapi-plugin-config-sync && yarn install
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 4. Enable the plugin
|
#### 4. Install the playground dependencies
|
||||||
|
|
||||||
Add the following lines to the `config/plugins.js` file in your Strapi project.
|
Run this in the root of the repository
|
||||||
|
|
||||||
```
|
|
||||||
const path = require('path');
|
|
||||||
// ...
|
|
||||||
{
|
|
||||||
'config-sync': {
|
|
||||||
enabled: true,
|
|
||||||
resolve: path.resolve(__dirname, '../src/plugins/config-sync'),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 5. Rebuild your Strapi project
|
|
||||||
|
|
||||||
Rebuild your strapi project to build the admin part of the plugin.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd YOUR_STRAPI_PROJECT && yarn build
|
yarn playground:install
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 6. Running the administration panel in development mode
|
#### 5. Run the compiler of the plugin
|
||||||
|
|
||||||
**Start the administration panel server for development**
|
We use `yalc` to publish the package to a local registry. Run the following command o watch for changes and push to `yalc` every time a change is made:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd YOUR_STRAPI_PROJECT && yarn develop --watch-admin
|
yarn develop
|
||||||
```
|
```
|
||||||
|
|
||||||
The administration panel will be available at http://localhost:8080/admin
|
#### 6. Start the playground instance
|
||||||
|
|
||||||
|
Leave the watcher running, open up a new terminal window and browse back to the root of the plugin repo. Run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn playground:develop
|
||||||
|
```
|
||||||
|
|
||||||
|
This will start the playground instance that will have the plugin installed from the `yalc` registry. Browse to http://localhost:1337 and create a test admin user to log in to the playground.
|
||||||
|
|
||||||
|
#### 7. Start your contribution!
|
||||||
|
|
||||||
|
You can now start working on your contribution. If you had trouble setting up this testing environment please feel free to report an issue on Github.
|
||||||
|
|
||||||
### Commit message convention
|
### Commit message convention
|
||||||
|
|
||||||
|
@ -82,12 +77,10 @@ The `package.json` file contains various scripts for common tasks:
|
||||||
|
|
||||||
- `yarn eslint`: lint files with ESLint.
|
- `yarn eslint`: lint files with ESLint.
|
||||||
- `yarn eslint:fix`: auto-fix ESLint issues.
|
- `yarn eslint:fix`: auto-fix ESLint issues.
|
||||||
- `yarn test:unit`: run unit tests with Jest.
|
- `yarn test:integration`: run integration tests with Jest.
|
||||||
|
|
||||||
### Sending a pull request
|
### Sending a pull request
|
||||||
|
|
||||||
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
|
|
||||||
|
|
||||||
When you're sending a pull request:
|
When you're sending a pull request:
|
||||||
|
|
||||||
- Prefer small pull requests focused on one change.
|
- Prefer small pull requests focused on one change.
|
||||||
|
|
Loading…
Reference in New Issue