mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Change compress tooling to avoid svg tag scrambling
This commit is contained in:
parent
eb5ecdb04e
commit
fab8f31064
21
.gitignore
vendored
21
.gitignore
vendored
@ -7,8 +7,7 @@
|
|||||||
*_index
|
*_index
|
||||||
*.orig
|
*.orig
|
||||||
*.swp
|
*.swp
|
||||||
.* # all hidden files...
|
|
||||||
!.gitignore # ...except gitignore
|
|
||||||
|
|
||||||
# binaries
|
# binaries
|
||||||
|
|
||||||
@ -19,8 +18,12 @@ __pycache__
|
|||||||
*.db
|
*.db
|
||||||
|
|
||||||
|
|
||||||
# files generated by setuptools
|
# build and env
|
||||||
|
|
||||||
|
build
|
||||||
|
0bin
|
||||||
|
env
|
||||||
|
venv
|
||||||
*.egg-info
|
*.egg-info
|
||||||
dist
|
dist
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
@ -28,14 +31,14 @@ dist
|
|||||||
*.in
|
*.in
|
||||||
|
|
||||||
|
|
||||||
# others
|
# IDE
|
||||||
|
|
||||||
content
|
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
*-workspace
|
*-workspace
|
||||||
*_old*
|
*_old*
|
||||||
settings_local.py
|
|
||||||
build
|
|
||||||
.vscode
|
.vscode
|
||||||
var
|
|
||||||
0bin
|
# JS
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
node_modules
|
||||||
|
23
compress.sh
23
compress.sh
@ -1,22 +1,20 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
command -v "yui-compressor" >/dev/null 2>&1 || {
|
python -c "import scss" || {
|
||||||
echo >&2 "Error: this script requires the command 'yui-compressor' to be available"
|
echo >&2 "Error: this script requires the scss python module. pip install -r dev-requirements.txt"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
command -v "uglifyjs" >/dev/null 2>&1 || {
|
command -v "uglifyjs" >/dev/null 2>&1 || {
|
||||||
echo >&2 "Error: this script requires the command 'uglifyjs' to be available"
|
echo >&2 "Error: this script requires the command 'uglifyjs' to be available."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
CURDIR=$(dirname $(readlink -f $0))
|
CURDIR=$(dirname $(readlink -f $0))
|
||||||
STATICDIR=$CURDIR'/zerobin/static/'
|
CSSDIR=$CURDIR'/zerobin/static/css/'
|
||||||
CSSDIR=$STATICDIR'css/'
|
JSDIR=$CURDIR'/zerobin/static/js/'
|
||||||
JSDIR=$STATICDIR'js/'
|
|
||||||
|
|
||||||
MAIN_JS_OUTPUT=$JSDIR"main.min.js"
|
MAIN_JS_OUTPUT=$JSDIR"main.min.js"
|
||||||
ADDITIONAL_JS_OUTPUT=$JSDIR"additional.min.js"
|
|
||||||
CSS_OUTPUT=$CSSDIR"style.min.css"
|
CSS_OUTPUT=$CSSDIR"style.min.css"
|
||||||
|
|
||||||
cat /dev/null >$CSS_OUTPUT
|
cat /dev/null >$CSS_OUTPUT
|
||||||
@ -24,16 +22,19 @@ cat /dev/null >$CSS_OUTPUT
|
|||||||
echo "Compressing CSS..."
|
echo "Compressing CSS..."
|
||||||
|
|
||||||
echo $'\n''/* Prettify */' >>$CSS_OUTPUT
|
echo $'\n''/* Prettify */' >>$CSS_OUTPUT
|
||||||
cat $CSSDIR'prettify.css' >>$CSS_OUTPUT
|
python -m scss $CSSDIR'prettify.css' >>$CSS_OUTPUT
|
||||||
|
rm $CSSDIR'prettify.min.css'
|
||||||
|
|
||||||
echo $'\n''/* Desert prettify theme */' >>$CSS_OUTPUT
|
echo $'\n''/* Desert prettify theme */' >>$CSS_OUTPUT
|
||||||
cat $CSSDIR'desert.css' >>$CSS_OUTPUT
|
python -m scss $CSSDIR'desert.css' >>$CSS_OUTPUT
|
||||||
|
rm $CSSDIR'desert.min.css'
|
||||||
|
|
||||||
echo $'\n''/* Bootswatch bootstrap theme */' >>$CSS_OUTPUT
|
echo $'\n''/* Bootswatch bootstrap theme */' >>$CSS_OUTPUT
|
||||||
yui-compressor $CSSDIR'bootswatch.4.5.css' >>$CSS_OUTPUT
|
python -m scss $CSSDIR'bootswatch.4.5.css' >>$CSS_OUTPUT
|
||||||
|
rm $CSSDIR'bootswatch.4.5.min.css'
|
||||||
|
|
||||||
echo $'\n''/* Our own CSS */' >>$CSS_OUTPUT
|
echo $'\n''/* Our own CSS */' >>$CSS_OUTPUT
|
||||||
yui-compressor $CSSDIR'style.css' >>$CSS_OUTPUT
|
python -m scss $CSSDIR'style.css' >>$CSS_OUTPUT
|
||||||
|
|
||||||
echo "Compressing JS..."
|
echo "Compressing JS..."
|
||||||
|
|
||||||
|
@ -1 +1,2 @@
|
|||||||
doit==0.32.0
|
doit==0.32.0
|
||||||
|
pyScss==1.3.7
|
||||||
|
51
zerobin/static/css/style.min.css
vendored
51
zerobin/static/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user