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"; npmDepsHash = "sha256-Vx9NOJfk4sF2MMy/x0mJ0SINqWgx5oKmc8XOhi2vu6I";
forceEmptyCache = true; forceEmptyCache = true;
buildPhase = "bash ${./build.sh}";
# Needed to properly invoke npm run build. # Needed to properly invoke npm run build.
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
nodePackages.tailwindcss nodePackages.tailwindcss

View File

@ -4,7 +4,7 @@
"description": "", "description": "",
"main": "main.js", "main": "main.js",
"scripts": { "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}\"", "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },

View File

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