1
Fork 0
theorangeone.net-legacy/Makefile

42 lines
986 B
Makefile
Raw Normal View History

2017-04-30 12:02:21 +01:00
BASEDIR=$(PWD)
NODE_BIN=node_modules/.bin
STATIC_SRC=$(BASEDIR)/static/src
STATIC_BUILD=$(BASEDIR)/static/build
OUTPUT_DIR=$(BASEDIR)/public
build: install
rm -rf $(OUTPUT_DIR)
2017-05-07 16:33:20 +01:00
rm -rf $(STATIC_BUILD)
2017-04-30 12:05:44 +01:00
mkdir -p $(STATIC_BUILD)/js $(STATIC_BUILD)/css
2017-04-30 12:02:21 +01:00
$(NODE_BIN)/browserify $(STATIC_SRC)/js/index.js -o $(STATIC_BUILD)/js/app.js
$(NODE_BIN)/node-sass $(STATIC_SRC)/scss/style.scss $(STATIC_BUILD)/css/style.css --source-map-embed
cp -r $(BASEDIR)/node_modules/font-awesome/fonts $(STATIC_BUILD)/fonts
2017-05-07 16:33:20 +01:00
cp -r $(STATIC_SRC)/img $(STATIC_BUILD)/img
2017-04-30 12:02:21 +01:00
@hugo -vDEF
clean:
rm -rf $(STATIC_BUILD)
rm -rf $(OUTPUT_DIR)
rm -rf $(BASEDIR)/node_modules
install: node_modules
@hugo version
node_modules:
npm install
2017-04-30 22:46:42 +01:00
test:
2017-04-30 22:52:59 +01:00
$(NODE_BIN)/sass-lint -vqc .sass-lint.yml
2017-04-30 22:46:42 +01:00
$(NODE_BIN)/eslint $(STATIC_SRC)/js --ignore-pattern *.min.js
2017-05-06 15:41:03 +01:00
$(NODE_BIN)/yamllint data/*.yml
$(NODE_BIN)/yamllint config.yml
$(NODE_BIN)/mdspell --en-gb -ranx 'content/**/*.*'
2017-04-30 22:46:42 +01:00
.PHONY: build clean install test