Skip to content

Commit

Permalink
Merge pull request #230 from City-of-Helsinki/UHF-8510-document-theme…
Browse files Browse the repository at this point in the history
…-build-commands

UHF-8510: Document commands for building assets in containers
  • Loading branch information
hyrsky authored Aug 24, 2023
2 parents bc96b8e + 260f1ed commit affc167
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ Requirements for developing:

## Commands

| Command | Description |
|---------------|-----------------------------------------------------------------------------------|
| nvm use | Uses correct Node version chosen for the theme compiler. |
| npm i | Install dependencies and link local packages. |
| npm ci | Install a project with a clean slate. Use especially in travis like environments. |
| npm run dev | Compile styles and js for development environment. and watch file changes. |
| npm run build | Build packages for production. Minify CSS/JS. |

Set up the developing environment by running
| Command | Container command | Description |
|---------------|-------------------------|-----------------------------------------------------------------------------------|
| nvm use | N/A | Uses correct Node version chosen for the theme compiler. |
| npm i | make install-hdbt-admin | Install dependencies and link local packages. |
| npm ci | N/A | Install a project with a clean slate. Use especially in travis like environments. |
| npm run dev | make watch-hdbt-admin | Compile styles and js for development environment. and watch file changes. |
| npm run build | make build-hdbt-admin | Build packages for production. Minify CSS/JS. |

Consistent Node version defined in `.nvmrc` should be used. For development, use either `nvm` to select the correct
version or `make` commands that select the version automatically. Run `make` the commands from the table above in the
project directory of your instance. For more information, see
[build-assets.md](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/build-assets.md).

Set up the developing environment with `nvm` by running

nvm use
npm i
Expand Down

0 comments on commit affc167

Please sign in to comment.