Add SCSS hot-reloading compilation for Hugo docs #226
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief description
Add SCSS hot-reloading compilation for Hugo docs with
npm run dev
command.Developer Certificate of Origin
Further details
chokidar
andconcurrently
dev-dependencies to watchsrc/
file changes (chokidar
) and run multiple node-scripts at once (concurrently
).build/hot-reload.js
which is almost the same compile function asbuild/build.js
except that there is less CSS processing (only autoprefixed CSS is applied).log()
function as a small module, because it's now used by 2 different files.build/constants.js
, because file-paths are now re-used across 2 files.Please note that
build/hot-reload.js
will only update thepaper.css
file on thedocs/static/assets
folder (/dist
folder will stay untouched, as this is a different script that is being run to generate this output).