about summary refs log tree commit diff
path: root/boilerplate/typescript/default.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-23T22·12+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-23T22·43+0000
commit9fdf4d00fa4abcdb356a919d293fd8686407ccf9 (patch)
tree3227c211118bcfe60f46c6f442fbc5035b2166d9 /boilerplate/typescript/default.nix
parent1cc1ce5ccf88adcbd064ac46a070b94faa04b871 (diff)
Support boilerplate for TypeScript projects
I would like to support boilerplate code for ReasonML, TypeScript,
ClojureScript, and Elm projects before I specialize in any of these
frameworks. All of my projects should use TailwindCSS.

All of this boilerplate should offer:
- Same command to start developing
- Same API to build and deploy
- TailwindCSS support
- Basic boilerplate for components, state, and routes

This TypeScript boilerplate is not complete, but I would like to commit the
progress in case I do not return to this for awhile.
Diffstat (limited to 'boilerplate/typescript/default.nix')
-rw-r--r--boilerplate/typescript/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/boilerplate/typescript/default.nix b/boilerplate/typescript/default.nix
new file mode 100644
index 000000000000..827056a913be
--- /dev/null
+++ b/boilerplate/typescript/default.nix
@@ -0,0 +1,19 @@
+let
+  pkgs = import <nixpkgs> {};
+in pkgs.stdenv.mkDerivation {
+  name = "ideal-website";
+  srcs = ./.;
+  buildInputs = with pkgs; [
+    nodejs
+    # Exposes lscpu for parcel.js
+    utillinux
+  ];
+  # parcel.js needs number of CPUs
+  PARCEL_WORKERS = "1";
+  buildPhase = ''
+    npx parcel build index.html
+  '';
+  installPhase = ''
+    mv dist $out
+  '';
+}