Elffuss BraidHub

kikocis/continue public

8cf316c34504 · 2.3 KiB · executableRawPermalink
1#!/usr/bin/env bash
2# This is used in a task in .vscode/tasks.json
3# Start developing with:
4# - Run Task -> Install Dependencies
5# - Debug -> Extension
6set -e
7
8# Check if node version matches .nvmrc
9if [ -f .nvmrc ]; then
10 required_node_version=$(cat .nvmrc)
11 current_node_version=$(node -v)
12
13 # Remove 'v' prefix from versions for comparison
14 required_version=${required_node_version#v}
15 current_version=${current_node_version#v}
16
17 if [ "$required_version" != "$current_version" ]; then
18 echo "⚠️ Warning: Your Node.js version ($current_node_version) does not match the required version ($required_node_version)"
19 echo "Please consider switching to the correct version using: nvm use"
20
21 if [ -t 0 ]; then
22 read -p "Press Enter to continue with installation anyway..."
23 else
24 echo "Continuing with installation anyway..."
25 fi
26 echo
27 fi
28fi
29
30echo "Installing root-level dependencies..."
31npm install
32
33echo "Building config-types..."
34pushd packages/config-types
35npm install
36npm run build
37popd
38
39echo "Building fetch..."
40pushd packages/fetch
41npm install
42npm run build
43popd
44
45echo "Building llm-info..."
46pushd packages/llm-info
47npm install
48npm run build
49popd
50
51echo "Building config-yaml..."
52pushd packages/config-yaml
53npm install
54npm run build
55popd
56
57echo "Building openai-adapters..."
58pushd packages/openai-adapters
59npm install
60npm run build
61popd
62
63echo "Building hub..."
64pushd packages/hub
65npm install
66npm run build
67popd
68
69echo "Installing Core extension dependencies..."
70pushd core
71## This flag is set because we pull down Chromium at runtime
72export PUPPETEER_SKIP_DOWNLOAD='true'
73npm install
74npm link
75popd
76
77echo "Installing GUI extension dependencies..."
78pushd gui
79npm install
80npm link @continuedev/core
81npm run build
82popd
83
84# VSCode Extension (will also package GUI)
85echo "Installing VSCode extension dependencies..."
86pushd extensions/vscode
87# This does way too many things inline but is the common denominator between many of the scripts
88npm install
89npm link @continuedev/core
90# npm run prepackage # not required since npm run package has prescript of prepackage
91npm run package
92popd
93
94echo "Installing binary dependencies..."
95pushd binary
96npm install
97npm run build
98popd
99
100echo "Installing docs dependencies..."
101pushd docs
102npm install
103popd