Change from pnpm to npm, add ./link.sh shortcut for npm style package linking
authorNick Downing <nick@ndcode.org>
Mon, 3 Jan 2022 03:59:05 +0000 (14:59 +1100)
committerNick Downing <nick@ndcode.org>
Mon, 3 Jan 2022 04:28:39 +0000 (15:28 +1100)
.gitignore
_config/site.jst
link.sh [new file with mode: 0755]

index eca904c..0e2151c 100644 (file)
@@ -8,4 +8,4 @@
 /_logs
 /_zet/site.*
 /node_modules
-/pnpm-lock.yaml
+/package-lock.json
index fd44767..d11c5c1 100644 (file)
@@ -61,7 +61,8 @@ CustomSite.prototype.respond = async function(env) {
   if (
     env.parsed_url.pathname === '/node_modules' ||
     env.parsed_url.pathname.slice(0, 14) === '/node_modules/' ||
-    env.parsed_url.pathname === '/package.json'
+    env.parsed_url.pathname === '/package.json' ||
+    env.parsed_url.pathname === '/package-lock.json'
   ) {
     this.die(env, `banned file ${env.parsed_url.pathname}`)
     return
diff --git a/link.sh b/link.sh
new file mode 100755 (executable)
index 0000000..0894a32
--- /dev/null
+++ b/link.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+rm -rf node_modules package-lock.json
+npm link @ndcode/emailjs_cache @ndcode/zettair_cache
+npm install
+npm link