Last active
May 17, 2019 17:03
-
-
Save thiagobraga/0686eb0e39a088e9a6c21d5e5207fa98 to your computer and use it in GitHub Desktop.
Makefile for compiling and watching sass files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PWD := $(shell pwd) | |
PATH := ${PWD}/node_modules/.bin:$(PATH) | |
.SILENT: build clean install release watch | |
all: install build watch | |
clean: | |
rm -rf dist/debug node_modules | |
install: | |
if [ ! -d node_modules ]; then npm ci; fi | |
build: | |
sass -s compressed --no-charset --no-source-map src/sass:dist/debug | |
css2userstyle --no-userscript dist/debug/theme.css | |
release: | |
sass -s compressed --no-charset --no-source-map src/sass:dist/release | |
postcss dist/release/theme.css --use autoprefixer cssnano --replace --no-map | |
css2userstyle --no-userscript dist/release/theme.css | |
watch: | |
chokidar src/sass -c 'make -s build' & \ | |
browser-sync start --config bs-config.js & \ | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment