Skip to content

Commit d735151

Browse files
committed
Merge branch 'master' of github.com:boazpoolman/strapi-plugin-config-sync
2 parents 38563db + 79a4a0b commit d735151

67 files changed

Lines changed: 11976 additions & 2635 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
"strapi": true
2727
},
2828
"rules": {
29+
"import/no-unresolved": [2, {
30+
"ignore": [
31+
"@strapi/strapi/admin",
32+
"@strapi/icons/symbols",
33+
"@strapi/admin/strapi-admin"
34+
]
35+
}],
36+
2937
"template-curly-spacing" : "off",
3038

3139
"indent" : "off",

.github/config-diff.png

-161 KB
Loading

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
uses: actions/setup-node@v3
1313
with:
1414
always-auth: true
15-
node-version: 16
15+
node-version: 18
1616
cache: 'yarn'
1717
registry-url: 'https://registry.npmjs.org/'
1818
- name: Install dependencies
@@ -31,3 +31,4 @@ jobs:
3131
with:
3232
commit_message: 'chore: Bump version to ${{ steps.get_version.outputs.VERSION }}'
3333
file_pattern: 'package.json'
34+
branch: master

.github/workflows/tests.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ on:
88
branches:
99
- master
1010
- develop
11+
- beta
1112

1213
jobs:
1314
lint:
1415
name: 'lint'
1516
runs-on: ubuntu-latest
1617
strategy:
1718
matrix:
18-
node: [14, 16, 18]
19+
node: [18, 20]
1920
steps:
2021
- uses: actions/checkout@v2
2122
- uses: actions/setup-node@v2
@@ -32,17 +33,21 @@ jobs:
3233
runs-on: ubuntu-latest
3334
strategy:
3435
matrix:
35-
node: [14, 16, 18]
36+
node: [18, 20]
3637
steps:
3738
- uses: actions/checkout@v2
3839
- uses: actions/setup-node@v2
3940
with:
4041
node-version: ${{ matrix.node }}
4142
cache: 'yarn'
4243
- name: Install dependencies plugin
43-
run: yarn --frozen-lockfile --unsafe-perm --production
44+
run: yarn --no-lockfile --unsafe-perm
45+
- name: Push the package to yalc
46+
run: yarn build
47+
- name: Add yalc package to the playground
48+
run: yarn playground:yalc-add
4449
- name: Install dependencies playground
45-
run: yarn playground:install --frozen-lockfile --unsafe-perm
50+
run: cd playground && yarn install --unsafe-perm
4651
- name: Build playground
4752
run: yarn playground:build
4853
- name: Run test
@@ -60,7 +65,7 @@ jobs:
6065
# runs-on: ubuntu-latest
6166
# strategy:
6267
# matrix:
63-
# node: [14, 16, 18]
68+
# node: [16, 18, 20]
6469
# steps:
6570
# - uses: actions/checkout@v2
6671
# - uses: actions/setup-node@v2

CONTRIBUTING.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,55 @@ We want this community to be friendly and respectful to each other. Please follo
44

55
## Development Workflow
66

7-
To get started with the project, make sure you have a local instance of Strapi running.
8-
See the [Strapi docs](https://github.com/strapi/strapi#getting-started) on how to setup a Strapi project.
7+
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!
98

10-
#### 1. Fork the [repository](https://github.com/boazpoolman/strapi-plugin-config-sync)
9+
#### 1. Fork the [repository](https://github.com/pluginpal/strapi-plugin-config-sync)
1110

12-
[Go to the repository](https://github.com/boazpoolman/strapi-plugin-config-sync) and fork it to your own GitHub account.
11+
[Go to the repository](https://github.com/pluginpal/strapi-plugin-config-sync) and fork it to your own GitHub account.
1312

14-
#### 2. Clone from your repository into the plugins folder
13+
#### 2. Clone the forked repository
1514

1615
```bash
17-
cd YOUR_STRAPI_PROJECT/src/plugins
18-
git clone git@github.com:YOUR_USERNAME/strapi-plugin-config-sync.git config-sync
16+
git clone git@github.com:YOUR_USERNAME/strapi-plugin-config-sync.git
1917
```
2018

2119
#### 3. Install the dependencies
2220

23-
Go to the plugin and install it's dependencies.
21+
Go to the folder and install the dependencies
2422

2523
```bash
26-
cd YOUR_STRAPI_PROJECT/src/plugins/config-sync/ && yarn plugin:install
24+
cd strapi-plugin-config-sync && yarn install
2725
```
2826

29-
#### 4. Enable the plugin
27+
#### 4. Install the playground dependencies
3028

31-
Add the following lines to the `config/plugins.js` file in your Strapi project.
29+
Run this in the root of the repository
3230

33-
```
34-
const path = require('path');
35-
// ...
36-
{
37-
'config-sync': {
38-
enabled: true,
39-
resolve: path.resolve(__dirname, '../src/plugins/config-sync'),
40-
},
41-
}
31+
```bash
32+
yarn playground:install
4233
```
4334

44-
#### 5. Rebuild your Strapi project
35+
#### 5. Run the compiler of the plugin
4536

46-
Rebuild your strapi project to build the admin part of the plugin.
37+
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:
4738

4839
```bash
49-
cd YOUR_STRAPI_PROJECT && yarn build
40+
yarn develop
5041
```
5142

52-
#### 6. Running the administration panel in development mode
43+
#### 6. Start the playground instance
5344

54-
**Start the administration panel server for development**
45+
Leave the watcher running, open up a new terminal window and browse back to the root of the plugin repo. Run the following command:
5546

5647
```bash
57-
cd YOUR_STRAPI_PROJECT && yarn develop --watch-admin
48+
yarn playground:develop
5849
```
5950

60-
The administration panel will be available at http://localhost:8080/admin
51+
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.
52+
53+
#### 7. Start your contribution!
54+
55+
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.
6156

6257
### Commit message convention
6358

@@ -82,12 +77,10 @@ The `package.json` file contains various scripts for common tasks:
8277

8378
- `yarn eslint`: lint files with ESLint.
8479
- `yarn eslint:fix`: auto-fix ESLint issues.
85-
- `yarn test:unit`: run unit tests with Jest.
80+
- `yarn test:integration`: run integration tests with Jest.
8681

8782
### Sending a pull request
8883

89-
> **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).
90-
9184
When you're sending a pull request:
9285

9386
- Prefer small pull requests focused on one change.

0 commit comments

Comments
 (0)