Elffuss BraidHub

kikocis/continue public

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