Skip to content
Snippets Groups Projects
Commit 3365fc66 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Improved assets

parent 8b108565
No related branches found
No related tags found
No related merge requests found
SASS = $(shell pwd)/../../node_modules/node-sass/bin/node-sass --output-style compressed
all: fonts.css style.css important.css semantic.css
fonts.css: fonts.sass
$(SASS) fonts.sass -o .
style.css: style.sass
$(SASS) style.sass -o .
important.css: important.scss
$(SASS) important.scss -o .
semantic.css: semantic.scss
$(SASS) semantic.scss -o .
#!/bin/bash
QUALITY=85
THUMB_QUALITY_PNG=70
THUMB_QUALITY_JPG=50
cd $(dirname $(realpath -s ${0}))
RULES=()
function generate_rule() {
file=${1}
filename=${2}
RULES+=("${filename}.css")
echo "${filename}.css: ${file}" >> Makefile.wip
echo " \$(SASS) ${file} -o ." >> Makefile.wip
}
function finalize() {
echo -n "all:" >> Makefile
for rule in "${RULES[@]}"; do
echo -n " $rule" >> Makefile
done
echo >> Makefile
cat Makefile.wip >> Makefile
rm Makefile.wip
}
cat <<EOF > Makefile
SASS = \$(shell pwd)/../../node_modules/node-sass/bin/node-sass --output-style compressed
EOF
for file in *.sass; do
generate_rule ${file} ${file%.*}
done
for file in *.scss; do
generate_rule ${file} ${file%.*}
done
finalize
\ No newline at end of file
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
"description": "This is a websearch frontend for a quassel database.", "description": "This is a websearch frontend for a quassel database.",
"scripts": { "scripts": {
"pug": "node_modules/pug-cli/index.js --basedir . **/index.pug index.pug", "pug": "node_modules/pug-cli/index.js --basedir . **/index.pug index.pug",
"sass": "node_modules/node-sass/bin/node-sass assets/css/ -o assets/css/ --output-style compressed", "sass": "assets/css/generate_makefile.sh && cd assets/css && make",
"assets": "assets/images/generate_makefile.sh && cd assets/images && make", "images": "assets/images/generate_makefile.sh && cd assets/images && make",
"build": "npm run assets && npm run sass && npm run pug" "build": "npm run images && npm run sass && npm run pug"
}, },
"author": "Janne Koschinski", "author": "Janne Koschinski",
"license": "GPL", "license": "GPL",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment