From: Nick Downing Date: Mon, 3 Jan 2022 03:59:05 +0000 (+1100) Subject: Change from pnpm to npm, add ./link.sh shortcut for npm style package linking X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?p=ndcode_site.git;a=commitdiff_plain;h=9d0e61ade10d41db7abdde0f32f649932bfb7748 Change from pnpm to npm, add ./link.sh shortcut for npm style package linking --- 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