Compare commits
4 Commits
f2513f7be0
...
292ce4be7f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
292ce4be7f | ||
|
|
6a4a2f7eef | ||
|
|
de7dbf45cd | ||
|
|
15187ed752 |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
framework/node/node_modules
|
||||||
|
framework/downloads
|
||||||
|
framework/binaries
|
||||||
|
framework/.nodejs
|
||||||
|
framework/.nodejs-config
|
||||||
21
cmd
Executable file
21
cmd
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This file belongs to the framework. You are not expected to modify it.
|
||||||
|
|
||||||
|
# FIXME: Obviously this file isn't nearly robust enough. Make it so.
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
subcmd="$1"
|
||||||
|
|
||||||
|
# echo "$subcmd"
|
||||||
|
|
||||||
|
#exit 3
|
||||||
|
|
||||||
|
shift
|
||||||
|
|
||||||
|
echo will run "$DIR"/framework/cmd.d/"$subcmd" "$@"
|
||||||
|
|
||||||
|
exec "$DIR"/framework/cmd.d/"$subcmd" "$@"
|
||||||
0
framework/.nodejs-config/.gitignore
vendored
Normal file
0
framework/.nodejs-config/.gitignore
vendored
Normal file
0
framework/.nodejs/.gitignore
vendored
Normal file
0
framework/.nodejs/.gitignore
vendored
Normal file
0
framework/binaries/.gitignore
vendored
Normal file
0
framework/binaries/.gitignore
vendored
Normal file
9
framework/cmd.d/list
Executable file
9
framework/cmd.d/list
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
cd "$DIR"
|
||||||
|
|
||||||
|
ls .
|
||||||
7
framework/cmd.d/node
Executable file
7
framework/cmd.d/node
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
"$DIR"/../shims/node "$@"
|
||||||
7
framework/cmd.d/pnpm
Executable file
7
framework/cmd.d/pnpm
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
"$DIR"/../shims/pnpm "$@"
|
||||||
21
framework/cmd.d/sync
Executable file
21
framework/cmd.d/sync
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# figure out the platform we're on
|
||||||
|
|
||||||
|
# source ../framework/versions
|
||||||
|
# [eventually: check for it in user's cache dir
|
||||||
|
# download $nodejs_version
|
||||||
|
# verify its checksum against $nodejs_checksum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cd $DIR/../node
|
||||||
|
|
||||||
|
$DIR/pnpm install
|
||||||
|
|
||||||
|
echo we will download other files here later
|
||||||
0
framework/downloads/.gitignore
vendored
Normal file
0
framework/downloads/.gitignore
vendored
Normal file
4
framework/shims/common
Normal file
4
framework/shims/common
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
ROOT="$DIR/../../"
|
||||||
|
|
||||||
|
|
||||||
15
framework/shims/node
Executable file
15
framework/shims/node
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/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 )"
|
||||||
|
|
||||||
|
source "$DIR/../versions"
|
||||||
|
|
||||||
|
node_bin="$DIR/../../$nodejs_bin_dir/node"
|
||||||
|
|
||||||
|
exec "$node_bin" "$@"
|
||||||
|
|
||||||
|
|
||||||
21
framework/shims/node.common
Normal file
21
framework/shims/node.common
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# FIXME this shouldn't be hardcoded here of course
|
||||||
|
|
||||||
|
nodejs_binary_dir="$DIR/../binaries/node-v22.15.1-linux-x64/bin"
|
||||||
|
|
||||||
|
# This might be too restrictive. Or not restrictive enough.
|
||||||
|
PATH="$nodejs_binary_dir":/bin:/usr/bin
|
||||||
|
|
||||||
|
|
||||||
|
project_root="$DIR/../.."
|
||||||
|
|
||||||
|
node_dir="$project_root/$nodejs_binary_dir"
|
||||||
|
|
||||||
|
export NPM_CONFIG_PREFIX="$node_dir/npm"
|
||||||
|
export NPM_CONFIG_CACHE="$node_dir/cache"
|
||||||
|
export NPM_CONFIG_TMP="$node_dir/tmp"
|
||||||
|
export NODE_PATH="$node_dir/node_modules"
|
||||||
|
|
||||||
|
echo $NPM_CONFIG_PREFIX
|
||||||
|
echo $NPM_CONFIG_CACHE
|
||||||
|
echo $NPM_CONFIG_TMP
|
||||||
|
echo $NODE_PATH
|
||||||
15
framework/shims/npm
Executable file
15
framework/shims/npm
Executable 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 "$@"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
12
framework/shims/pnpm
Executable file
12
framework/shims/pnpm
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
source "$DIR"/node.common
|
||||||
|
source "$DIR"/common
|
||||||
|
|
||||||
|
cd $ROOT/framework/node
|
||||||
|
|
||||||
|
exec "$DIR"/../binaries/pnpm "$@"
|
||||||
Reference in New Issue
Block a user