Elffuss BraidHub

kikocis/continue public

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