Created
March 14, 2019 20:09
-
-
Save trescenzi/0c1c35c359bea26025eacc21f2839ac9 to your computer and use it in GitHub Desktop.
A quick and dirty jade to html conversion script that leaves the file rather pretty and without any `&`s. Make sure to `npm install -g pug prettier` first.
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
pug $1.jade | |
# remove && escapes | |
sed -i.bak "s/&&/\&\&/g" $1.html | |
# remove extra whitespace | |
sed -i.bak -E "s/[[:space:]]+/ /g" $1.html | |
# prettify | |
prettier $1.html > $1.prettier.html | |
# move back to goal file | |
mv $1.prettier.html $1.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment