Elffuss BraidHub

kikocis/continue public

3ecf862e2425 · 2.0 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 openai-adapters..."
34pushd packages/openai-adapters
35npm install
36npm run build
37popd
38
39echo "Building config-yaml..."
40pushd packages/config-yaml
41npm install
42npm run build
43popd
44
45echo "Installing Core extension dependencies..."
46pushd core
47## This flag is set because we pull down Chromium at runtime
48export PUPPETEER_SKIP_DOWNLOAD='true'
49npm install
50npm link
51popd
52
53echo "Installing GUI extension dependencies..."
54pushd gui
55npm install
56npm link @continuedev/core
57npm run build
58popd
59
60# VSCode Extension (will also package GUI)
61echo "Installing VSCode extension dependencies..."
62pushd extensions/vscode
63# This does way too many things inline but is the common denominator between many of the scripts
64npm install
65npm link @continuedev/core
66# npm run prepackage # not required since npm run package has prescript of prepackage
67npm run package
68popd
69
70echo "Installing binary dependencies..."
71pushd binary
72npm install
73npm run build
74popd
75
76echo "Installing docs dependencies..."
77pushd docs
78npm install
79popd