-
Notifications
You must be signed in to change notification settings - Fork 224
Add '--wwwroot' and '--wwwroot-out' option to "kpm pack" #622
Conversation
if (!string.IsNullOrEmpty(_options.WWWRoot) && | ||
!Directory.Exists(Path.Combine(project.ProjectDirectory, _options.WWWRoot))) | ||
{ | ||
Console.WriteLine("The specified wwwroot folder '{0}' doesn't exist in project directory.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in project
--> in the project
Not really familiar with the feature, so I just did a grammar check 😄 Need @davidfowl for an actual review. |
var appFolderIniFilePath = Path.Combine(appFolderPath, "k.ini"); | ||
var appBaseLine = string.Format("KRE_APPBASE={0}", | ||
var wwwRootOutIniFilePath = Path.Combine(wwwRootOutPath, "k.ini"); | ||
var appBaseLine = string.Format("APP_BASE={0}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was change to KRE_APPBASE in a recent commit. Changing this will regresses the behavior...
@davidfowl @Eilon , thanks for the feedbacks. I fixed them in the latest commit. |
The stuff from my feedback looks good. @davidfowl will have to comment on the feature itself. |
f66d569
to
f1d917c
Compare
@davidfowl , added interaction between |
{ | ||
var targetProjectJson = Path.Combine(TargetPath, Runtime.Project.ProjectFileName); | ||
var jsonObj = JObject.Parse(File.ReadAllText(targetProjectJson)); | ||
jsonObj["webroot"] = WwwRoot; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this match the wwwrootout? It should be a relative path from the project.json to the new wwwroot folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I misunderstood the requirements. Fixed in the latest commit.
|
- '--wwwroot' specifies the name of public folder in project dir - '--wwwroot-out' specifies the name of public folder in packed image - '--appfolder' is replaced by '--wwwroot-out' - If '--wwwroot-out' is not specified, the packed image doesn't contain a public folder - If 'webroot' property is specified, use it as default value of '--wwwroot' - "kpm pack" updates 'webroot' of project.json in the packed image
6e61edb
to
5cca757
Compare
folder
parent #543
Also implement part of #541 , that is, if
--wwwroot-out
doesn't have a value, we don't create public folder in packed image.