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: CONTRIBUTING.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,17 +69,20 @@ If you would like to work on a new core feature or improvement, first create a [
69
69
70
70
## Control Panel Front End
71
71
72
-
In order to work on the control panel front end, we recommend opening two terminal windows. Run `npm run dev` in one, and `npm run dev:cp` in the other. That will start the main Vite process as well as the Vite process for the `@craftcms/cp` package.
72
+
In order to work on the control panel front end, we recommend opening two terminal windows.
73
73
74
-
With both running, you'll be able to work on most aspects of the control panel.
74
+
1. Run `npm run dev` in one window to start the Vite development server.
75
+
2. Run `npm run dev:cp` in the other window to start the Vite process for the `@craftcms/cp` package.
76
+
77
+
With both processes running, you'll be able to work on most aspects of the control panel.
75
78
76
79
If getting into the weeds is your thing, more detail on these pieces is provided below.
77
80
78
-
### CP assets
81
+
### Control Panel Assets
79
82
80
-
The assets specific to the CP live in the `resources` folder. Those are built using a fairly typical Vite setup. To develop assets for the CP, there are two commands:
83
+
The assets specific to the control panel live in the `resources` folder. Those are built using a fairly typical Vite setup. To develop assets for the control panel, there are two commands:
81
84
```shell
82
-
# Run the vite development server
85
+
# Run the Vite development server
83
86
npm run dev
84
87
85
88
# Build assets for production
@@ -88,7 +91,7 @@ npm run build
88
91
89
92
### `@craftcms/cp` package
90
93
91
-
The CP is largely backed by web components that live in the `@craftcms/cp` package within the `packages/craftcms-cp` directory. Like other packages, it has its own build process that can be run independently of the CP.
94
+
The control panel is largely backed by web components that live in the `@craftcms/cp` package within the `packages/craftcms-cp` directory. Like other packages, it has its own build process that can be run independently of the control panel.
92
95
```shell
93
96
# Run the build in watch mode. Assets will be rebuilt on every change
94
97
npm run dev:cp
@@ -97,14 +100,14 @@ npm run dev:cp
97
100
npm run build:cp
98
101
```
99
102
100
-
In practice, you rarely work on one without the other, so we recommend having two terminal panes open. One running the main CP assets build and another building the web components.
103
+
In practice, you rarely work on one without the other, so we recommend having two terminal panes open. One running the main control panel assets build and another building the web components.
101
104
102
105
### Legacy Bundles
103
106
104
107
> [!NOTE]
105
108
> Updating the legacy bundles should be a rare occurrence. Avoid when possible.
106
109
107
-
All of the styles and scripts used to support the CP up until Craft 5 live in the [yii2-adapter](https://github.com/craftcms/yii2-adapter) package. That package has its own NPM dependencies and build process, but because it's common to have that package symlinked into your Craft 6 project, you're able to run the build scripts via the `build:bundles` command.
110
+
All the styles and scripts used to support the control panel up until Craft 5 live in the [yii2-adapter](https://github.com/craftcms/yii2-adapter) package. That package has its own NPM dependencies and build process, but because it's common to have that package symlinked into your Craft 6 project, you're able to run the build scripts via the `build:bundles` command.
0 commit comments