-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
38 lines (32 loc) · 991 Bytes
/
Rakefile
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
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
namespace :vscode do
desc "Install dependencies of vscode extension"
task :deps do
Dir.chdir(File.expand_path("./client/vscode", __dir__)) do
sh "npm ci"
end
end
desc "Build vscode extension"
task build: :deps do
Dir.chdir(File.expand_path("./client/vscode", __dir__)) do
# See: https://code.visualstudio.com/api/working-with-extensions/publishing-extension
sh "npm run package"
end
end
desc "Test vscode extension"
task test: :deps do
Dir.chdir(File.expand_path("./client/vscode", __dir__)) do
sh "npm test"
end
end
desc "Install vscode extension"
task install: :build do
Dir.chdir(File.expand_path("./client/vscode", __dir__)) do
# See: https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix
sh "code --install-extension yoda-*.vsix"
end
end
end