Skip to content

Commit 7cf68a2

Browse files
authored
Merge pull request #60 from dotkernel/readme-vite
updated readme - static modules
2 parents b03ca52 + 5deb11f commit 7cf68a2

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,28 @@ composer development-enable
9999
100100
- If not already done, remove the `.dist` extension from `config/autoload/development.local.php.dist`.
101101
102-
## NPM Commands
102+
## Bundling Static Modules
103+
104+
> Prerequisite software: Node.js v20 (minimum supported version)
103105
104106
To install dependencies into the `node_modules` directory run this command.
105107
106108
```shell
107109
npm install
108110
```
109111
110-
- If `npm install` fails, this could be caused by user permissions of npm. Recommendation is to install npm through `Node Version Manager`.
112+
If `npm install` fails, this could be caused by user permissions of npm.
113+
We recommend installing npm through `Node Version Manager`.
111114
112-
The watch command compiles the components then watches the files and recompiles when one of them changes.
115+
> You can skip the next step until you make changes in the `src/App/assets` folder
113116
114-
```shell
115-
npm run watch
116-
```
117+
The build command compiles the components from the `src/App/assets` folder into the `public` folder.
117118
118-
After all updates are done, this command compiles the assets locally, minifies them and makes them ready for production.
119+
> This command overwrites existing files in the `public` folder.
119120
120121
```shell
121-
npm run prod
122-
```
122+
npm run build
123+
```
123124
124125
## Running the application
125126

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "index.js",
66
"type": "module",
77
"scripts": {
8-
"preview": "php -S 0.0.0.0:8080 -t public",
9-
"build": "vite build --watch"
8+
"watch": "vite build --watch",
9+
"build": "vite build"
1010
},
1111
"repository": {
1212
"type": "git",

0 commit comments

Comments
 (0)