fix new-express-project
This commit is contained in:
@@ -236,15 +236,19 @@ class Main {
|
|||||||
static function newExpressProject(args:Array<String>) {
|
static function newExpressProject(args:Array<String>) {
|
||||||
var title = promptFor("title (lower-case!)").toLowerCase();
|
var title = promptFor("title (lower-case!)").toLowerCase();
|
||||||
var pkg = title.replace("-", "_");
|
var pkg = title.replace("-", "_");
|
||||||
var kissExpressLibPath = new Process("haxelib", ["libpath", "kiss-express"]).stdout.readAll().toString().trim();
|
var kissExpressLibPath = libPath("kiss-express");
|
||||||
var workingDir = Sys.getCwd();
|
var workingDir = Sys.getCwd();
|
||||||
var projectDir = Path.join([workingDir, title]);
|
var projectDir = Path.join([workingDir, title]);
|
||||||
FileSystem.createDirectory(projectDir);
|
FileSystem.createDirectory(projectDir);
|
||||||
|
|
||||||
var makeFileForNewProject:haxe.Constraints.Function = _makeFileForNewProject.bind(kissExpressLibPath, _, workingDir, title, "", pkg);
|
var makeFileForNewProject:haxe.Constraints.Function = _makeFileForNewProject.bind(kissExpressLibPath, _, workingDir, title, "", pkg);
|
||||||
var makeFolderForNewProject:haxe.Constraints.Function = _makeFolderForNewProject.bind(kissExpressLibPath, _, workingDir, title, "", pkg);
|
var makeFolderForNewProject:haxe.Constraints.Function = _makeFolderForNewProject.bind(kissExpressLibPath, _, workingDir, title, "", pkg);
|
||||||
|
makeFolderForNewProject(["externs"]);
|
||||||
makeFolderForNewProject(["src", "template"]);
|
makeFolderForNewProject(["src", "template"]);
|
||||||
makeFileForNewProject([".gitignore"]);
|
makeFileForNewProject([".gitignore"]);
|
||||||
|
makeFileForNewProject([".haxerc"]);
|
||||||
|
Sys.setCwd(projectDir);
|
||||||
|
Sys.println(new Process("lix", ["install", "gh:kiss-lang/kiss-express"]).stdout.readAll().toString().trim());
|
||||||
makeFileForNewProject(["build.hxml"]);
|
makeFileForNewProject(["build.hxml"]);
|
||||||
{
|
{
|
||||||
makeFileForNewProject(["package.json"]);
|
makeFileForNewProject(["package.json"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user