From 9d0e61ade10d41db7abdde0f32f649932bfb7748 Mon Sep 17 00:00:00 2001 From: Nick Downing Date: Mon, 3 Jan 2022 14:59:05 +1100 Subject: [PATCH] Change from pnpm to npm, add ./link.sh shortcut for npm style package linking --- .gitignore | 2 +- _config/site.jst | 3 ++- link.sh | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 link.sh diff --git a/.gitignore b/.gitignore index eca904c..0e2151c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ /_logs /_zet/site.* /node_modules -/pnpm-lock.yaml +/package-lock.json diff --git a/_config/site.jst b/_config/site.jst index fd44767..d11c5c1 100644 --- a/_config/site.jst +++ b/_config/site.jst @@ -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 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 -- 2.34.1