public PreviewCommand(ColoredTextWriter textWriter, PreviewArgumentResolver argumentResolver, PreviewMain preview, IFuse fuse) : base("preview", "Preview an app") { _textWriter = textWriter; _preview = preview; _argumentResolver = argumentResolver; _fuse = fuse; _optionSet = CreateOptions(); _helpArguments = new HelpArguments( new HelpHeader("fuse " + Name, Description), new HelpSynopsis("fuse preview [<Options>] [<AppSource>]"), new HelpDetailedDescription(@"Previews an app by using a simulator. Your app will instantly reload when there are any saved changes to an UX file. <AppSource> can be a relative or an absolute path to a project file. It can also be the relative or absolute path to the containing directory of the project. Working directory is used as <AppSource> if not specified otherwise. NOTE: The project must contain an UX file with an App tag for preview to work."), new HelpOptions(new [] { _optionSet.ToTable(), new Table("Preview Targets", new [] { new Row("Local", "Preview locally (default)"), new Row("Android", "Preview on an Android device."), new Row("iOS", "Preview on an iOS device. NOTE: Only OSX can target this device"), //new Row("MSVC", "Export preview app project for MSVC"), //new Row("Cmake", "Export preview app project for Cmake"), }), })); }
public static void WriteHelp(this ColoredTextWriter writer, HelpArguments arguments) { using (writer.PushColor(ConsoleColor.Yellow)) { writer.WriteLine("Usage: " + arguments.Synopsis.Usage); arguments.HelpHeader.Description.Do(writer.WriteLine); } arguments.Options.Do( options => { foreach (var table in options.Tables) { using (writer.PushColor(ConsoleColor.Green)) { writer.WriteLine(table.Name.ToUpper()); } writer.WriteTable(table, indent: 4, columnPadding: 4); } }); using (writer.PushColor(ConsoleColor.Green)) writer.WriteLine("DESCRIPTION"); writer.WriteLine(arguments.DetailedDescription.Description); }
public UnoConfigCommand(ColoredTextWriter textWriter) : base("unoconfig", "Print uno config") { _textWriter = textWriter; _helpArguments = new HelpArguments( new HelpHeader("fuse " + Name, Description), new HelpSynopsis("fuse unoconfig"), new HelpDetailedDescription(@"Prints the current uno configuration"), Optional.None()); }
public ResetPreviewCliCommand(ColoredTextWriter textWriter, IFuseLauncher daemonSpawner) : base("reset-preview", "Causes all active previews to reset to the default state.", true) { _textWriter = textWriter; _daemonSpawner = daemonSpawner; _helpArguments = new HelpArguments( new HelpHeader("fuse " + Name, Description), new HelpSynopsis("fuse reset-preview"), new HelpDetailedDescription(@"Causes all active previews to reset to their default application state."), Optional.None()); }
public TutorialCommand(ColoredTextWriter textWriter) : base("tutorial", "Go to tutorials and guides") { _textWriter = textWriter; _helpArguments = new HelpArguments( new HelpHeader("fuse " + Name, Description), new HelpSynopsis("fuse tutorial"), new HelpDetailedDescription( @"Takes you to our landing page, using the default program set for opening HTTP URL's. NOTE: It require network connection."), Optional.None()); }
public override void Help() { var helpArguments = new HelpArguments( new HelpHeader("fuse " + Name, Description), _helpSynopsis, new HelpDetailedDescription( "Creates a new daemon if no daemon exists, unless --no-spawn option is used.\n" + "Send message to daemon by writing to stdin and receive message from daemon by reading from stdout." ), new HelpOptions(_optionSet.ToTable())); _textWriter.WriteHelp(helpArguments); }
public EventViewerCommand(ColoredTextWriter textWriter, IFuse fuse) : base("event-viewer", "Dump all events", true) { _textWriter = textWriter; _fuse = fuse; _optionSet = CreateOptions(); _report = _fuse.Report; _helpArguments = new HelpArguments( new HelpHeader("fuse " + Name, Description), new HelpSynopsis("fuse " + Name + " [<Options>]"), new HelpDetailedDescription("Dumps all Fuse events to the console."), new HelpOptions(new[] { _optionSet.ToTable(), })); }
public override void Help() { var helpArguments = new HelpArguments( new HelpHeader("fuse " + Name, Description), new HelpSynopsis("fuse install [<Options>] <Component>"), new HelpDetailedDescription( @"This command downloads and installs a component. NOTE: Network connection is required."), new HelpOptions( new[] { _options.ToTable(), new Table("Components", GetComponentInstallers()) })); _output.WriteHelp(helpArguments); }
public DaemonCommand( ColoredTextWriter textWriter, IReport report, EnsureSingleUser ensureSingleUser, IFuseLauncher fuseLauncher, Func <DaemonArgs, DaemonRunner> daemonRunner) : base("daemon", "Start the fuse daemon") { _textWriter = textWriter; _report = report; _ensureSingleUser = ensureSingleUser; _fuse = fuseLauncher; _optionSet = CreateOptions(); _daemonRunner = daemonRunner; _helpArguments = new HelpArguments( new HelpHeader("fuse " + Name, Description), new HelpSynopsis("fuse daemon [<Options>]"), new HelpDetailedDescription( @"Fuse daemon starts a local server on port(12122). It communicates over our own protocol, with a Plugin API built on top. Documentation for the protocol and the API will be released later."), new HelpOptions(_optionSet.ToTable())); }