Skip to content

Commit

Permalink
doc: update Asset Compilation section
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubersilva committed Apr 12, 2024
1 parent a9ea626 commit 7b0b2ef
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ plugin for WordPress.

### Asset Compilation
To compile your CSS & JS assets, run one of the following:
- `npm run dev` — Compiles all assets for development one time
- `npm run watch` — Compiles all assets for development one time and then watches for changes, supporting [BrowserSync](https://laravel-mix.com/docs/5.0/browsersync)
- `npm run hot` — Compiles all assets for development one time and then watches for [hot replacement](https://laravel-mix.com/docs/5.0/hot-module-replacement)
- `npm run dev` — Compiles all assets for production one time

- `npm run dev` — Compiles all assets (except Form Extension assets) for development one time
- `npm run watch` — Compiles all assets (except Form Extension assets) for development one time and then watches for
changes, supporting [BrowserSync](https://laravel-mix.com/docs/5.0/browsersync)
- `npm run dev:form-extension` — Compiles Form Extension assets for development one time
- `npm run watch:form-extension` — Compiles Form Extension assets for development one time and then watches for changes,
supporting [BrowserSync](https://laravel-mix.com/docs/5.0/browsersync)
- `npm run start` — Compiles all assets for development one time and then watches for changes

## Concepts

Expand Down Expand Up @@ -53,8 +57,11 @@ No domain code should reference (and therefore depend on) the `src/Addon` direct
keeps the dependency unidirectional.

#### Note for developers
If running `npm run dev` throws an error then check whether the `images` folder exists in your addon directory under `src/Addon/resources`.
1. If the `images` folder does not exist then create one.

If running `npm run dev` throws an error then check whether the `images` folder exists in your addon directory
under `src/Addon/resources`.

1. If the `images` folder does not exist then create one.
2. If the `images` folder isn't required then remove the code from `webpack.config.js`.

---
Expand Down

0 comments on commit 7b0b2ef

Please sign in to comment.