Fix all relative paths in built output
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Cadence Ember 2020-10-21 00:26:46 +13:00
parent 25c3fe17b4
commit ad86c3b064
Signed by: cadence
GPG key ID: BC1C2C61CF521B17
2 changed files with 3 additions and 3 deletions

View file

@ -154,11 +154,11 @@ async function addSass(sourcePath, targetPath) {
indentType: "tab",
indentWidth: 1,
functions: {
"static($name)": function(name) {
"relative($name)": function(name) {
if (!(name instanceof sass.types.String)) {
throw "$name: expected a string"
}
const result = static.get(name.getValue())
const result = getRelative(targetPath, static.get(name.getValue()))
if (typeof result === "string") {
return new sass.types.String(result)
} else {

View file

@ -2,7 +2,7 @@
@font-face
font-family: Whitney
font-weight: $weight
src: url(static("/assets/fonts/whitney-" + $weight + ".woff")) format("woff2")
src: url(relative("/assets/fonts/whitney-" + $weight + ".woff")) format("woff2")
+import-whitney(400)
+import-whitney(500)