-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.ps1
51 lines (41 loc) · 1.54 KB
/
install.ps1
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
# Start Windows PowerShell with the "Run as administrator" option.
# set-executionpolicy remotesigned (A)
# https://eosfactory.io/eoside/html/_static/eoside-1.0.2.vsix
Write-Host "
# This script, downloaded from https://github.com/tokenika/eoside,
# installs EOSIDE, the Integrated Development Environment for EOSIO smart
contracts by Tokenika.
"
Write-Host "Checking the current directory ..."
$workingDirectory = Convert-Path (Resolve-Path -path ".")
If(![System.IO.File]::Exists("$workingDirectory\package.json")){
Write-Host "
# It needs to be executed from within the 'eoside' folder. This condition
# seems unfulfilled as the command 'dir eoside\package.json' fails.
#
"
}
$vsceVersion=$vsceVersion=npm list -g vsce
If ($vsceVersion -contains "(empty)"){
npm install -g vsce
}
Remove-Item .\*.vsix
vsce package
$vsixFiles=Get-ChildItem .\*.vsix
# --install-extension (<extension-id> | <extension-vsix-path>)
# Installs or updates the extension.
# Use `--force` argument to avoid prompts.
code --install-extension $vsixFiles[0]
Write-Host "
______ ____ _____ _ _____ ______
| ____| / __ \ / ____|| || __ \ | ____|
| |__ | | | || (___ | || | | || |__
| __| | | | | \___ \ | || | | || __|
| |___ | |__| | ____) || || |__| || |____
|______| \____/ |_____/ |_||_____/ |______|
"
Write-Host "
To verify installation navigate to the 'eoside' folder and execute
'eoside.ps1'.
# Alternatively, run 'code -n'.
# "