mirror of https://github.com/tbklang/tpkg
Dub
- Upgraded niknaks InitCommand - Remove duplicate dependencies
This commit is contained in:
parent
41d782b699
commit
8e85087b4e
2
dub.json
2
dub.json
|
@ -7,7 +7,7 @@
|
|||
"gogga": ">=3.1.1",
|
||||
"jcli": "0.25.0-beta.3",
|
||||
"tlang": "~feature/comments",
|
||||
"niknaks": ">=0.15.2"
|
||||
"niknaks": ">=0.15.4"
|
||||
},
|
||||
"description": "Tristan Programming Language package manager",
|
||||
"license": "GPL v3",
|
||||
|
|
|
@ -13,6 +13,7 @@ import std.exception : ErrnoException;
|
|||
import tpkg.lib.docgen;
|
||||
import tlang.compiler.core : Compiler, gibFileData;
|
||||
import niknaks.config : Registry;
|
||||
import niknaks.arrays : unique;
|
||||
|
||||
public Registry* reg;
|
||||
|
||||
|
@ -83,6 +84,7 @@ struct InitCommand
|
|||
Prompter prompter = new Prompter(stdin);
|
||||
prompter.addPrompt(Prompt("Project name: ", false, false));
|
||||
prompter.addPrompt(Prompt("Project description: ", false, false));
|
||||
prompter.addPrompt(Prompt("Dependencies?: ", true));
|
||||
|
||||
|
||||
Prompt[] answers = prompter.prompt();
|
||||
|
@ -108,6 +110,11 @@ struct InitCommand
|
|||
ERROR("Could not get a valid project description");
|
||||
return;
|
||||
}
|
||||
|
||||
string[] projDeps;
|
||||
answers[2].getValues(projDeps);
|
||||
projDeps = unique(projDeps);
|
||||
DEBUG("Dependencies wanted: ", projDeps);
|
||||
|
||||
JSONValue json = proj.serialize();
|
||||
string jsonStr = json.toPrettyString();
|
||||
|
|
Loading…
Reference in New Issue