fixing purgecss issue with chroma styles

This commit is contained in:
Adam Piontek 2021-04-06 11:22:05 -04:00
parent c1963ff386
commit 9d2e0c5379
4 changed files with 8 additions and 7 deletions

4
.gitignore vendored
View file

@ -39,10 +39,8 @@ npm-debug.log
# for vscode elixir_ls extension files # for vscode elixir_ls extension files
/.elixir_ls /.elixir_ls
# Ignore the pygments venv directory
/priv/pygments/
# Ignore chroma bin directory # Ignore chroma bin directory
/priv/chroma/ /priv/go/
# dev # dev
TODO.md TODO.md

View file

@ -36,9 +36,10 @@ cd /opt/home73k
git pull git pull
mix deps.get --only prod mix deps.get --only prod
MIX_ENV=prod mix compile MIX_ENV=prod mix compile
# update Pygments in venv # update chroma in priv gopath
priv/pygments/bin/pip3 install -U Pygments GOPATH=$(pwd)/priv/go go get -u github.com/alecthomas/chroma/cmd/chroma
# rebuild static assets: # rebuild static assets:
rm -rf priv/static/*
npm run deploy --prefix ./assets npm run deploy --prefix ./assets
MIX_ENV=prod mix phx.digest MIX_ENV=prod mix phx.digest
MIX_ENV=prod mix release --overwrite MIX_ENV=prod mix release --overwrite

View file

@ -93,7 +93,9 @@ module.exports = (env, options) => {
"../**/live/**/*.ex", "../**/live/**/*.ex",
"./js/**/*.js", "./js/**/*.js",
]), ]),
safelist: [/phx/, /topbar/, /chroma/], safelist: {
greedy: [/phx/, /topbar/, /chroma/],
},
}), }),
] ]
), ),

View file

@ -14,7 +14,7 @@ config :elixir, :time_zone_database, Tzdata.TimeZoneDatabase
config :home73k, :app_global_vars, config :home73k, :app_global_vars,
time_zone: "America/New_York", time_zone: "America/New_York",
blog_content: "priv/content", blog_content: "priv/content",
chroma_bin: "priv/chroma/chroma" chroma_bin: "priv/go/bin/chroma"
# Configures the endpoint # Configures the endpoint
config :home73k, Home73kWeb.Endpoint, config :home73k, Home73kWeb.Endpoint,