Add build script.

jekyll
Joshua Potter 2023-12-13 16:16:44 -07:00
parent 808a22f464
commit 7968f301c2
4 changed files with 13 additions and 5 deletions

6
build.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
tsc
tailwindcss -i ./src/main.css -o ./dist/main.css
cp ./src/index.html ./dist/index.html
cp ./src/*.svg ./dist

View File

@ -29,6 +29,8 @@
npmDepsHash = "sha256-Vx9NOJfk4sF2MMy/x0mJ0SINqWgx5oKmc8XOhi2vu6I";
forceEmptyCache = true;
buildPhase = "bash ${./build.sh}";
# Needed to properly invoke npm run build.
nativeBuildInputs = with pkgs; [
nodePackages.tailwindcss

View File

@ -4,7 +4,7 @@
"description": "",
"main": "main.js",
"scripts": {
"build": "tsc && tailwindcss -i ./src/main.css -o ./dist/main.css && cp ./src/index.html ./dist/index.html && cp ./src/*.svg ./dist/*.svg",
"build": "./build.sh",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
"test": "echo \"Error: no test specified\" && exit 1"
},

View File

@ -11,10 +11,10 @@
<body>
<header class="flex">
<h1 class="grow">Joshua Potter</h1>
<div>
<image src="./github.svg" />
<image src="./linkedin.svg" />
<image src="./zotero.svg" />
<div class="flex gap-x-4">
<image class="w-6 h-6" src="./github.svg" />
<image class="w-6 h-6" src="./linkedin.svg" />
<image class="w-6 h-6" src="./zotero.svg" />
</div>
</header>
</body>