2018-03-23 19:49:06 +00:00
|
|
|
LESS_DIR = ./static/less
|
|
|
|
LESS_FILE = style.less
|
|
|
|
CSS_DIR = ./static/css
|
|
|
|
CSS_FILE = style.min.css
|
|
|
|
CSS_TMP_FILE = tmp.css
|
2018-05-01 18:59:02 +00:00
|
|
|
current_dir = $(shell pwd)
|
2018-03-23 19:49:06 +00:00
|
|
|
|
|
|
|
.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)
|
|
|
|
|
2018-05-01 18:59:02 +00:00
|
|
|
demo: build
|
|
|
|
mkdir -p exampleSite/themes/coder
|
|
|
|
mkdir -p exampleSite/themes/coder/archetypes
|
|
|
|
mkdir -p exampleSite/themes/coder/images
|
|
|
|
mkdir -p exampleSite/themes/coder/layouts
|
|
|
|
mkdir -p exampleSite/themes/coder/static
|
|
|
|
cp -r $(current_dir)/archetypes/* exampleSite/themes/coder/archetypes/
|
|
|
|
cp -r $(current_dir)/images/* exampleSite/themes/coder/images
|
|
|
|
cp -r $(current_dir)/layouts/* exampleSite/themes/coder/layouts
|
|
|
|
cp -r $(current_dir)/static/* exampleSite/themes/coder/static
|
|
|
|
cp -r $(current_dir)/theme.toml exampleSite/themes/coder/theme.toml
|
2018-05-21 17:02:16 +00:00
|
|
|
cd exampleSite && hugo serve -D
|
2018-05-01 18:59:02 +00:00
|
|
|
|
2018-03-23 19:49:06 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(CSS_DIR)/*.css
|
2018-05-01 18:59:02 +00:00
|
|
|
rm -rf exampleSite/themes/coder
|