From a3c63511d76da59ac850483632a586fc2912559e Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Wed, 13 Dec 2023 15:43:47 -0700 Subject: [PATCH] Add tailwindcss. --- .githooks/pre-commit | 0 flake.nix | 12 ++++++++---- package-lock.json | 10 +--------- package.json | 7 ++----- src/index.html | 7 +++++++ src/main.css | 3 +++ tailwind.config.cjs | 9 +++++++++ 7 files changed, 30 insertions(+), 18 deletions(-) mode change 100644 => 100755 .githooks/pre-commit create mode 100644 src/main.css create mode 100644 tailwind.config.cjs diff --git a/.githooks/pre-commit b/.githooks/pre-commit old mode 100644 new mode 100755 diff --git a/flake.nix b/flake.nix index 091a78b..2c8bb67 100644 --- a/flake.nix +++ b/flake.nix @@ -26,15 +26,18 @@ pname = "portfolio"; version = "0.1.0"; src = ./.; - npmDepsHash = "sha256-eGfiDf/BKQcGhwGvmqpHTQNkAfiKSSPIfrmrPsGyOHw="; + npmDepsHash = "sha256-Vx9NOJfk4sF2MMy/x0mJ0SINqWgx5oKmc8XOhi2vu6I"; + forceEmptyCache = true; # Needed to properly invoke npm run build. - nativeBuildInputs = [ pkgs.typescript ]; + nativeBuildInputs = with pkgs; [ + nodePackages.tailwindcss + typescript + ]; installPhase = '' mkdir $out - cp src/index.html $out - cp dist/main.js $out + cp -a dist/* $out ''; }; @@ -45,6 +48,7 @@ packages = with pkgs; [ nodePackages.prettier nodePackages.typescript-language-server + nodePackages.tailwindcss nodejs prefetch-npm-deps typescript diff --git a/package-lock.json b/package-lock.json index efd8cdb..f81657f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,15 +7,7 @@ "": { "name": "portfolio", "version": "0.1.0", - "license": "ISC", - "dependencies": { - "lodash": "^4.17.21" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "license": "ISC" } } } diff --git a/package.json b/package.json index b063f62..3d941b0 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,11 @@ "description": "", "main": "main.js", "scripts": { - "build": "tsc", + "build": "tsc && tailwindcss -i ./src/main.css -o ./dist/main.css && cp ./src/index.html ./dist/index.html", "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", - "license": "ISC", - "dependencies": { - "lodash": "^4.17.21" - } + "license": "ISC" } diff --git a/src/index.html b/src/index.html index 1b5a1a5..4965492 100644 --- a/src/index.html +++ b/src/index.html @@ -4,10 +4,17 @@ + +
+

Joshua Potter

+ Github + Zotero + Linkedin +
diff --git a/src/main.css b/src/main.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/src/main.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/tailwind.config.cjs b/tailwind.config.cjs new file mode 100644 index 0000000..2ffeab0 --- /dev/null +++ b/tailwind.config.cjs @@ -0,0 +1,9 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["src/**/*.{html,ts}"], + theme: { + extend: {}, + }, + plugins: [], +} +