idt/installers/
graphql_lsp.rs1use std::path::Path;
2
3use crate::Installer;
4
5pub struct GraphQlLsp<'a> {
6 pub dev_tools_dir: &'a Path,
7 pub bin_dir: &'a Path,
8}
9
10impl Installer for GraphQlLsp<'_> {
11 fn bin_name(&self) -> &'static str {
12 "graphql-lsp"
13 }
14
15 fn install(&self) -> rootcause::Result<()> {
16 crate::installers::install_npm_tool(
17 self.dev_tools_dir,
18 self.bin_dir,
19 self.bin_name(),
20 "graphql-language-service-cli",
21 &["graphql-language-service-cli"],
22 )
23 }
24}