Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-8510: Document commands for building assets in containers #148

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 build-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