Skip to content

Commit

Permalink
UHF-8510: Document commands for building assets in containers
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrsky committed Aug 18, 2023
1 parent 2715729 commit f1bec5f
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions public/themes/custom/hdbt_subtheme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@ Requirements for developing:

## Commands

| Command | Description |
| ------------- | --------------------------------------------------------------------------------- |
| nvm use | Uses correct Node version chosen for the subtheme 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 for development environment and watch file changes. |
| npm run build | Build packages for production. Minify CSS/JS. Create icon sprite. |

Setup the developing environment by running
| Command | Make command | Description |
|---------------|----------------------------|-----------------------------------------------------------------------------------|
| nvm use | N/A | Uses correct Node version chosen for the subtheme compiler |
| npm i | make install-hdbt-subtheme | 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-subtheme | Compile styles for development environment and watch file changes. |
| npm run build | make watch-hdbt-subtheme | Build packages for production. Minify CSS/JS. Create icon sprite. |

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 f1bec5f

Please sign in to comment.