Improved css generation (#31)
by a plugin (örks) from max. lets see how it works outside his test enviroment
This commit is contained in:
parent
815b01f4b9
commit
7c84c382b2
4 changed files with 27 additions and 17 deletions
|
@ -7,10 +7,9 @@ cache:
|
||||||
- $HOME/.cache/pip
|
- $HOME/.cache/pip
|
||||||
before_install:
|
before_install:
|
||||||
- git lfs pull
|
- git lfs pull
|
||||||
- make install-sassc
|
|
||||||
install:
|
install:
|
||||||
- "pip install Lektor"
|
- "pip install Lektor"
|
||||||
- make sass
|
- make build
|
||||||
script: "lektor build"
|
script: "lektor build"
|
||||||
before_deploy: "echo 'c3woc.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC5NslYj+wtriBuKIxJfDRm9E2hnlstWR8durQ6pKvVvP7wjcoXIyAxe41GvJ9SoEhSjF7oVlzlw+zAkzl5WOZ4=' > ~/.ssh/known_hosts"
|
before_deploy: "echo 'c3woc.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC5NslYj+wtriBuKIxJfDRm9E2hnlstWR8durQ6pKvVvP7wjcoXIyAxe41GvJ9SoEhSjF7oVlzlw+zAkzl5WOZ4=' > ~/.ssh/known_hosts"
|
||||||
deploy:
|
deploy:
|
||||||
|
|
34
Makefile
34
Makefile
|
@ -3,28 +3,32 @@ LEKTOR_SERVER_FLAGS=-h 127.0.0.1
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
sass:
|
sass:
|
||||||
./sassc/bin/sassc -t compressed ./assets/sass/main.scss ./assets/css/main.min.css
|
|
||||||
./sassc/bin/sassc -t compressed ./assets/sass/ie9.scss ./assets/css/ie9.min.css
|
|
||||||
lektor clean --yes
|
lektor clean --yes
|
||||||
lektor build
|
lektor server -f jsminify
|
||||||
|
|
||||||
sass-uncompressed:
|
|
||||||
./sassc/bin/sassc ./assets/sass/main.scss ./assets/css/main.css
|
|
||||||
./sassc/bin/sassc ./assets/sass/ie9.scss ./assets/css/ie9.css
|
|
||||||
lektor clean --yes
|
|
||||||
lektor build
|
|
||||||
|
|
||||||
|
.ONESHELL:
|
||||||
install:
|
install:
|
||||||
if hash apt 2>/dev/null; then sudo apt update; sudo apt install imagemagick python3 python3-pip -y; elif hash pacman 2>/dev/null; then sudo pacman -Sy graphicsmagick glibc lib32-glibc python python-pip --noconfirm; elif hash dnf 2>/dev/null; then sudo dnf install -y ImageMagick python3 python3-pip; else echo -e "Please install Imagemagick, Python3 and Pip!"; fi
|
if hash apt-get 2>/dev/null; then
|
||||||
|
sudo apt-get update -qq >/dev/null && sudo apt-get install -qq apt-utils imagemagick python3-pip python3-setuptools gcc
|
||||||
|
elif hash pacman 2>/dev/null; then
|
||||||
|
sudo pacman -Syu imagemagick python-pip glibc lib32-glibc gcc --noconfirm
|
||||||
|
elif hash dnf 2>/dev/null; then
|
||||||
|
sudo dnf install -y ImageMagick python3-pip gcc
|
||||||
|
else
|
||||||
|
echo -e "Please install Imagemagick, python3-pip and gcc"
|
||||||
|
fi
|
||||||
pip install lektor --user
|
pip install lektor --user
|
||||||
make install-sassc
|
# pip3 install wheel --user
|
||||||
|
lektor plugin flush-cache
|
||||||
|
|
||||||
install-sassc:
|
install-sassc:
|
||||||
if [ ! -d './sassc' ]; then git clone https://github.com/sass/sassc.git sassc; cd sassc; git reset tags/3.5.0; cd ..; . sassc/script/bootstrap ; make -C sassc -j4 ; fi
|
lektor plugin flush-cache
|
||||||
|
lektor clean --yes
|
||||||
|
lektor build -f jsminify
|
||||||
|
|
||||||
build: sass
|
build:
|
||||||
lektor build
|
lektor clean --yes
|
||||||
|
lektor build -f jsminify
|
||||||
|
|
||||||
server:
|
server:
|
||||||
lektor server $(LEKTOR_SERVER_FLAGS)
|
lektor server $(LEKTOR_SERVER_FLAGS)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
name = c3woc
|
name = c3woc
|
||||||
url = https://c3woc.de/
|
url = https://c3woc.de/
|
||||||
url_style = absolute
|
url_style = absolute
|
||||||
|
excluded_assets = sass, sass/*, *.scss
|
||||||
|
|
||||||
[servers.c3woc]
|
[servers.c3woc]
|
||||||
name = c3woc
|
name = c3woc
|
||||||
|
@ -22,3 +23,6 @@ name = Englisch
|
||||||
locale = en_US
|
locale = en_US
|
||||||
url_prefix = /en/
|
url_prefix = /en/
|
||||||
|
|
||||||
|
|
||||||
|
[packages]
|
||||||
|
lektor-scsscompile = 1.0.1
|
||||||
|
|
3
configs/scsscompile.ini
Normal file
3
configs/scsscompile.ini
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
source_dir = assets/sass/
|
||||||
|
output_dir = assets/css/
|
||||||
|
output_style = compressed
|
Loading…
Reference in a new issue