mirror of https://github.com/luizdepra/hugo-coder.git

Luiz de Prá
23.49.2018 454ea0146dc6087b9e3b96b4a2f7b66ce1a2f4f7
Add Makefile to build CSS
2 files modified
1 files added
27 ■■■■■ changed files
.editorconfig 3 ●●●●● patch | view | raw | blame | history
Makefile 16 ●●●●● patch | view | raw | blame | history
README.md 8 ●●●● patch | view | raw | blame | history
.editorconfig
@@ -24,3 +24,6 @@
# web files
[*.{html,css,less}]
indent_size = 2
[Makefile]
indent_style = tab
Makefile
New file
@@ -0,0 +1,16 @@
LESS_DIR = ./static/less
LESS_FILE = style.less
CSS_DIR = ./static/css
CSS_FILE = style.min.css
CSS_TMP_FILE = tmp.css
.PHONY: clean build
build: clean
    lessc $(LESS_DIR)/$(LESS_FILE) > $(CSS_DIR)/$(CSS_TMP_FILE)
    uglifycss $(CSS_DIR)/$(CSS_TMP_FILE) > $(CSS_DIR)/$(CSS_FILE)
    rm -f $(CSS_DIR)/$(CSS_TMP_FILE)
clean:
    rm -f $(CSS_DIR)/*.css
README.md
@@ -58,6 +58,12 @@
### Build & Test
To update or generate the minified CSS file:
```
make build
```
To build your site and test, run:
```
@@ -80,4 +86,4 @@
## Special Thanks
- Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination.
- All contributors, for every PR and Issue reported.\
- All contributors, for every PR and Issue reported.