-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·61 lines (46 loc) · 1.29 KB
/
install.sh
File metadata and controls
executable file
·61 lines (46 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# This script
# - checks SmallJS prerequisite applications
# - Installs the SmallJS language extension in VSCode.
# - Installs npm dependencies
# Exit script if a step fails
set -e
# Set working directory to script directory
cd "$(dirname "$0")"
echo "==== Detecting prerequisite applications"
echo "Note: For installing prerequisite apps, see: Documentation/Prerequisites.md."
echo -n "Detecting Visual Studio Code: "
code -v
echo -n "Detecting Node.js: "
node -v
# Check minimum version of Node.js
if [[ "$OS" == "Windows_NT" ]]
then
nodeBin="node.exe"
else
nodeBin="node"
fi
nodeVersion=`$nodeBin -v`
if [[ "$nodeVersion" != v25.* ]]
then
echo "Failed: SmallJS requires Node.js with minimum version: V25.0.0"
echo "You can download it from: https://nodejs.org/en/download/current"
exit 1
fi
echo -n "Detecting npm: "
npm -v
# TypeScript must be installed globally to work from VSCode.
echo -n "Detecting TypeScript: "
tsc -v
# Check npx dependencies here to force first-time installation
echo "Detecting http-server: "
npx http-server --version
echo "Detecting kill-port: "
npx kill-port
# kill-port does not produce output.
echo "OK".
echo "==== Installing core npm packages"
./Extension/install.sh
./Compiler/install.sh
./Node/install.sh
echo "==== All core installs successful"