Skip to content

Add SCSS hot-reloading compilation for Hugo docs - #226

Merged
rhyneav merged 12 commits into
developfrom
build/hot-reload
Sep 28, 2020
Merged

rhyneav merged 12 commits into
developfrom
build/hot-reload

Conversation

@TotomInc

Copy link
Copy Markdown
Contributor

Brief description

Add SCSS hot-reloading compilation for Hugo docs with npm run dev command.

Developer Certificate of Origin

Further details

  • Added chokidar and concurrently dev-dependencies to watch src/ file changes (chokidar) and run multiple node-scripts at once (concurrently).
  • Added build/hot-reload.js which is almost the same compile function as build/build.js except that there is less CSS processing (only autoprefixed CSS is applied).
  • Refactor log() function as a small module, because it's now used by 2 different files.
  • Refactor files path into the build/constants.js, because file-paths are now re-used across 2 files.

Please note that build/hot-reload.js will only update the paper.css file on the docs/static/assets folder (/dist folder will stay untouched, as this is a different script that is being run to generate this output).

@TotomInc
TotomInc changed the base branch from master to develop September 14, 2020 06:19
@rhyneav

rhyneav commented Sep 28, 2020

Copy link
Copy Markdown
Member

So awesome, looks great to me! Thank you for adding this in, I think it'll make developing new styles so much easier.

@rhyneav
rhyneav merged commit 3b406c5 into develop Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants