public static void Install(string projectPath, NodeDelegate nodeDelegate) { try { UserInterface.OutputPane.Show(); var cmd = new NodeCommand { Module = "npm", Arguments = "install", Path = projectPath, Delegate = delegate(NodeResponse response) { UserInterface.Log(response.Message); nodeDelegate.Invoke(response); } }; cmd.Start(); } catch (Exception ex) { UserInterface.ShowError(ex.ToString()); } }
public static void Run(string targetPath, string taskName, NodeDelegate nodeDelegate) { var cmd = new NodeCommand { Module = CommandModuleString, Arguments = String.Format("--no-color {0}", taskName), Path = targetPath, Delegate = delegate(NodeResponse response) { UserInterface.Log(response.Message); nodeDelegate.Invoke(response); } }; cmd.Start(); }