aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz de Prá <luiz.pra@olist.com>2018-03-23 16:49:06 -0300
committerLuiz de Prá <luiz.pra@olist.com>2018-03-23 16:49:06 -0300
commit454ea0146dc6087b9e3b96b4a2f7b66ce1a2f4f7 (patch)
tree30f0b68d864790e7ec97fc98231f029a221c8671
parentd3e619ecf9d451c7b6574a53d13555ac2faffdd5 (diff)
downloadhugo-coder-master.tar.gz
hugo-coder-master.tar.bz2
hugo-coder-master.zip
Add Makefile to build CSSHEADmaster
-rw-r--r--.editorconfig3
-rw-r--r--Makefile16
-rw-r--r--README.md8
3 files changed, 26 insertions, 1 deletions
diff --git a/.editorconfig b/.editorconfig
index 363da9e..cb3f0cd 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -24,3 +24,6 @@ indent_size = 2
# web files
[*.{html,css,less}]
indent_size = 2
+
+[Makefile]
+indent_style = tab
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4c4b6b9
--- /dev/null
+++ b/Makefile
@@ -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
diff --git a/README.md b/README.md
index c838ed4..cf84788 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,12 @@ You can look at full working [`config.toml`](https://github.com/luizdepra/hugo-c
### Build & Test
+To update or generate the minified CSS file:
+
+```
+make build
+```
+
To build your site and test, run:
```
@@ -80,4 +86,4 @@ Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-code
## 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.