Flesh out shims and wrappers

This commit is contained in:
Michael Wolf
2025-11-08 09:54:33 -06:00
parent 6a4a2f7eef
commit 292ce4be7f
9 changed files with 39 additions and 6 deletions

4
cmd
View File

@@ -16,4 +16,6 @@ subcmd="$1"
shift
exec "$DIR"/cmd.d/"$subcmd" "$@"
echo will run "$DIR"/framework/cmd.d/"$subcmd" "$@"
exec "$DIR"/framework/cmd.d/"$subcmd" "$@"

7
framework/cmd.d/node Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -eu
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
"$DIR"/../shims/node "$@"

View File

@@ -4,4 +4,4 @@ set -eu
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
"$DIR"/../framework/shims/pnpm "$@"
"$DIR"/../shims/pnpm "$@"

6
cmd.d/sync → framework/cmd.d/sync Normal file → Executable file
View File

@@ -14,4 +14,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../framework/node
cd $DIR/../node
$DIR/pnpm install
echo we will download other files here later

4
framework/shims/common Normal file
View File

@@ -0,0 +1,4 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT="$DIR/../../"

View File

@@ -1,5 +1,7 @@
#!/bin/bash
# This file belongs to the framework. You are not expected to modify it.
set -eu
export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

15
framework/shims/npm Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -eu
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$DIR"/node.common
cd $DIR/../.nodejs-config
echo in dir $(pwd)
npm "$@"

View File

@@ -5,9 +5,8 @@ set -eu
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$DIR"/node.common
source "$DIR"/common
# "$DIR"/../.nodejs-config/node_modules/.bin/pnpm "$@"
echo pnpm file: "$DIR"/../shims/pnpm
cd $ROOT/framework/node
exec "$DIR"/../binaries/pnpm "$@"