Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions public/themes/custom/hdbt_subtheme/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
node_modules/**/*
webpack.config.js
webpack.svgToSprite.js
2 changes: 1 addition & 1 deletion public/themes/custom/hdbt_subtheme/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23
22
12 changes: 3 additions & 9 deletions public/themes/custom/hdbt_subtheme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

HDBT Subtheme is a so called "starterkit" which you can start using by enabling it in `/admin/appearance`.

HDBT Subtheme uses webpack module bundler to compile the JS and SCSS files. Also, the SVG icons are combined in to a
sprite.svg via webpack.
HDBT Subtheme uses HDBT theme builder to compile the JS and SCSS files. Also, the SVG icons are combined in to a sprite.svg via the theme builder.

As the HDBT Subtheme is only distributed via the [HELfi Platform](https://github.com/City-of-Helsinki/drupal-helfi-platform),
it doesn't have an upgrade path per se. In case there is a demand for upgrade-ability for existing projects then of
Expand Down Expand Up @@ -50,13 +49,8 @@ Explanations for commands.
Related files.
- `.nvmrc` : Defines the node version used to compile the theme.
- `package.json and package-lock.json` : Defines the node modules for compiling the theme.
- `postcss.config.js and postcss.plugins.js` : Configurations for the postcss-tool that is run when the theme is built.
You can read more about the tool here: https://postcss.org/
- `webpack.config.js` : Configuration file for the webpack-tool that is used to actually build the theme. Similar tool
to Gulp or Grunt. Usually if there is something wrong with the compiled theme files the culprit can be found here.
- `webpack.svgToSprite.js` : This file is used to create a sprite of all the icons used on the site. It gets all the
icons from the `./src`, compiles them into a sprite under `./dist/icons` and also creates a css-file where the icons are
referenced called `./dist/css/hdbt-icons.css`.
- `theme-builder/` : The theme builder tools.
- `theme-builder.mjs` : Configuration file for the theme builder tool that is used to build the theme.

Start SCSS/JS watcher by running

Expand Down
Loading