on master help sign in
ob run: serve assets from local staticFiles path
089624bLuigy Leon
default.nix+1−1
@@ -154,7 +154,7 @@ in rec {
154 set -euo pipefail
154 set -euo pipefail
155 touch "$out"
155 touch "$out"
156 mkdir -p "$symlinked"
156 mkdir -p "$symlinked"
157− obelisk-asset-manifest-generate "$src" "$haskellManifest" ${packageName} ${moduleName} "$symlinked"
157+ obelisk-asset-manifest-generate "$src" "${builtins.toString src}" "$haskellManifest" ${packageName} ${moduleName} "$symlinked"
158 '';
158 '';
159
159
160 compressedJs = frontend: optimizationLevel: pkgs.runCommand "compressedJs" { buildInputs = [ pkgs.closurecompiler ]; } ''
160 compressedJs = frontend: optimizationLevel: pkgs.runCommand "compressedJs" { buildInputs = [ pkgs.closurecompiler ]; } ''
lib/asset/manifest/src-bin/generate.hs+2−2
@@ -7,11 +7,11 @@ import System.Environment
7main :: IO ()
7main :: IO ()
8main = do
8main = do
9 --TODO: Usage
9 --TODO: Usage
10− [root, haskellTarget, packageName, moduleName, fileTarget] <- getArgs
10+ [root, rootLocalPath, haskellTarget, packageName, moduleName, fileTarget] <- getArgs
11 paths <- gatherHashedPaths root
11 paths <- gatherHashedPaths root
12 writeStaticProject paths haskellTarget $ StaticConfig
12 writeStaticProject paths haskellTarget $ StaticConfig
13 { _staticConfig_packageName = T.pack packageName
13 { _staticConfig_packageName = T.pack packageName
14 , _staticConfig_moduleName = T.pack moduleName
14 , _staticConfig_moduleName = T.pack moduleName
15− , _staticConfig_rootPath = root
15+ , _staticConfig_rootPath = rootLocalPath
16 }
16 }
17 copyAndSymlink paths root fileTarget
17 copyAndSymlink paths root fileTarget