diff options
author | William Carroll <wpcarro@gmail.com> | 2020-03-19T11·53+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-03-19T12·30+0000 |
commit | 1d45f146158b0bc678f4204f2c22d481d3ea20a7 (patch) | |
tree | bb7e77dd8dee0202782b25dd6055f68f7d404b9e /covid-uk/default.nix | |
parent | c627fa9cbd9231e38b6c66cad5eed084a33767b5 (diff) |
Update COVID-19 webpage
- Prefer hosting on sandbox.wpcarro.dev; I would prefer to host it at sandbox.wpcarro.dev/covid-19, but I haven't figure out how to use Nginx to do serve locations like /covid-19 yet. - Splice the src directory: When I develop locally and index.html exists within ./src, I cannot access ./node_modules because ./node_modules is in a parent directory. I could fix this if I used a bundler like Parcel or Webpack, but I do not want to set that up at this time. - Introduce Tailwind for CSS. This complicates my build a bit as well. For now, I'm including output.css even though ideally I should not version-control this file. I haven't figured out how to `yarn install` and run commands like `npx tailwindcss build styles.css -o output.css` in a Nix derivation yet. Hopefully I will learn and refactor this. - Add some content about why I made this chart - Add some content about some of my covid-19 predictions - Add a footer to the webpage - Delete timeseries.json and prefer fetching the published data instead
Diffstat (limited to 'covid-uk/default.nix')
-rw-r--r-- | covid-uk/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/covid-uk/default.nix b/covid-uk/default.nix index 5189daddf28a..0f5545c2f75d 100644 --- a/covid-uk/default.nix +++ b/covid-uk/default.nix @@ -4,11 +4,13 @@ pkgs.stdenv.mkDerivation { name = "covid-uk"; buildInputs = []; src = ./.; + # TODO(wpcarro): Need to run `yarn install` somehow. + # TODO(wpcarro): Need to run `npx tailwindcss build styles.css -o output.css`. buildPhase = '' mkdir -p $out mkdir -p $out/node_modules/chart.js/dist cp $src/node_modules/chart.js/dist/Chart.bundle.min.js $out/node_modules/chart.js/dist - cp $src/src/* $out + cp $src/index.html $src/output.css $out ''; dontInstall = true; } |