add some readme
This commit is contained in:
parent
37de4976b3
commit
eaf7cb30ab
3 changed files with 43 additions and 7 deletions
|
@ -12,3 +12,10 @@ Right now the CLI uses [DNX](https://github.com/aspnet/dnx) as an application ho
|
|||
* Requires VS 2015 with Web Development Tools installed to open in VS
|
||||
* Requires that you have a DNX installed (the build script _should_ set it up for you though)
|
||||
* Compilation is not required before building, but you must run `dnu restore` (which comes from the DNX commands) after changing dependencies. If you add/remove dependencies in VS, it will run it for you
|
||||
|
||||
## A simple test (windows only for now)
|
||||
|
||||
Note: The explicit `--framework` and `--runtime` switches will definitely be going away :)
|
||||
|
||||
1. `cd test\TestApp`
|
||||
2. `..\..\scripts\dotnet run --framework dnxcore50 --runtime win7-x86`
|
||||
|
|
|
@ -11,16 +11,44 @@ namespace Microsoft.DotNet.Cli
|
|||
if (args.Length < 1)
|
||||
{
|
||||
// Handle missing args
|
||||
Console.Error.WriteLine("TODO: Help");
|
||||
PrintCommandList();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (args[0].Equals("help", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (args.Length > 1)
|
||||
{
|
||||
return Command.Create("dotnet-" + args[1], "--help")
|
||||
.ForwardStdErr()
|
||||
.ForwardStdOut()
|
||||
.RunAsync()
|
||||
.Result
|
||||
.ExitCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintCommandList();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return Command.Create("dotnet-" + args[0], args.Skip(1))
|
||||
.ForwardStdErr(Console.Error)
|
||||
.ForwardStdOut(Console.Out)
|
||||
.ForwardStdErr()
|
||||
.ForwardStdOut()
|
||||
.RunAsync()
|
||||
.Result
|
||||
.ExitCode;
|
||||
}
|
||||
}
|
||||
|
||||
private static void PrintCommandList()
|
||||
{
|
||||
Console.WriteLine("Some dotnet Commands (use 'dotnet help <command>' to get help):");
|
||||
Console.WriteLine("* compile - Compiles code");
|
||||
Console.WriteLine("* publish - Publishes a project to a self-contained application");
|
||||
Console.WriteLine("* run - Publishes and immediately runs a project");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"emitEntryPoint": true,
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.ConsoleHost": "1.0.0-*",
|
||||
|
|
Loading…
Add table
Reference in a new issue