Skip to content

Commit

Permalink
use static file
Browse files Browse the repository at this point in the history
  • Loading branch information
amitaibu committed Jul 12, 2024
1 parent cef0394 commit 205b49e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion Web/View/StyleGuide/Index.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ instance View IndexView where
quote = RenderQuote
{ body = "The quick brown fox jumps over the lazy dog."
, subtitle = "An old proverb."
, imageUrl = "/paragraph_quotes/imageUrl/84fa7d47-002d-4fe5-a86a-df51cc4ec10f"
, imageUrl = "/styleGuideImages/kitten-with-wings.jpg"
}
|> Web.Element.Quote.render

Expand Down
19 changes: 0 additions & 19 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,6 @@
# Custom processes that don't appear in https://devenv.sh/reference/options/
processes = {
tailwind.exec = "tailwindcss -c tailwind/tailwind.config.js -i ./tailwind/app.css -o static/app.css --watch=always";

# @todo: Move to a better place?
initDevEnv.exec = ''
UUID="84fa7d47-002d-4fe5-a86a-df51cc4ec10f"
SOURCE_FILE="/static/styleGuideImages/$UUID"
TARGET_DIR="/paragraph_quotes/imageUrl"
TARGET_FILE="$TARGET_DIR/$UUID"
# Create the target directory if it doesn't exist
mkdir -p "$TARGET_DIR"
# Check if the file exists, if not, copy it
if [ ! -f "$TARGET_FILE" ]; then
cp "$SOURCE_FILE" "$TARGET_FILE"
echo "File copied to $TARGET_FILE"
else
echo "File already exists at $TARGET_FILE"
fi
'';
};

# This is needed so when running tests in GitHub actions, we can execute `devenv up &` without an error.
Expand Down

0 comments on commit 205b49e

Please sign in to comment.