You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-11Lines changed: 34 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,11 @@
2
2
3
3
Here we have main script sources to be used in WP Rocket plugin repository.
4
4
5
+
## Building
6
+
5
7
`dist` directory contains the final build files.
6
8
7
-
## Scripts/Commands
9
+
Developments for the scripts are done in the `src` folder. To update the outputs in the dist folder
8
10
9
11
```
10
12
npm run build:unmin
@@ -24,27 +26,48 @@ npm run build
24
26
25
27
This is to build both minified and not minified versions.
26
28
27
-
## How to test a change in WP Rocket plugin
29
+
# Updating WP Rocket
30
+
31
+
## How to import changes from rocket-scripts
28
32
29
-
1. Create a branch and PR for your change in this repository.
30
-
2. Edit `package.json` inside WP Rocket plugin repository to have the following line:
33
+
The following steps must be followed when you need to test a new version of the scripts within WP Rocket plugin, or to submit a new version into WP Rocket through a PR.
34
+
35
+
1. Create a branch and PR for your changes in this repository.
36
+
2. Check out wp rocket plugin on branch develop (or a dedicated branch for the issue to test if needed)
37
+
3. Edit `package.json` inside WP Rocket plugin repository to change the targeted version of wp-rocket-scripts:
4. Remove `node_modules` directory and `package-lock.json` file.
49
+
5. Run the command
36
50
```
37
51
npm install
38
52
```
39
-
5. Use the gulp task there to generate the beacon script:
53
+
54
+
You should see the targeted version of the beacon in your working directory `/node_modules/wp-rocket-scripts/dist`.
55
+
56
+
6. Use the gulp task there to generate the beacon script:
40
57
```
41
58
npm run gulp build:js:beacon
42
59
```
43
-
6. This will update the beacon script with the corresponding branch changes.
44
60
45
-
## How to release
46
-
1. Update the version in `package.json`
61
+
You should see the new beacon files in `assets/js`.
62
+
63
+
7. Compile the plugin zip as usual.
64
+
65
+
## How to release a new version
66
+
67
+
When a new WP Rocket release occurs with a new version of rocket-scripts, or when new developments are available on rocket-scripts develop without breaking compatibility with WP Rocket, a new rocket-scripts version must be created. To do so:
68
+
69
+
1. Update the version in `package.json`.
47
70
2. Make sure everything is merged into `trunk` branch.
48
-
3. Create a release from `trunk`
71
+
3. Create a release from `trunk`.
49
72
4. Github Workflow will run to release into npm.
50
73
5. In WP Rocket or any other code that uses this package can update the version in their `package.json` and run `npm install` again.
0 commit comments