-
-
Notifications
You must be signed in to change notification settings - Fork 197
Implement install command #589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ |
|
||
execute(args: string[]): IFuture<void> { | ||
return (() => { | ||
let projectFilePath = this.getProjectFilePath(args[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.
Maybe you can cache the result of this.getProjectFilePath(args[0])
in a variable, as you have already read the file and its content in canExecute
.
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.
Maybe an even better solution is to cache the contents of package.json (or the nativescript key) inside getProjectData.
why is bin/nativescript.js changed:100644 → 100755 ? |
let platformData = $platformsData.getPlatformData(platform); | ||
let frameworkPackageData = projectData[platformData.frameworkPackageName]; | ||
if(frameworkPackageData && frameworkPackageData.version) { | ||
this.$injector.resolve("platformService").addPlatforms([`${platform}@${frameworkPackageData.version}`]).wait(); |
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.
you can resolve platformService outside of each statement
I'm unable to use this command, I've tried the following scenarios:
|
7576a5c
to
e6abdc7
Compare
✅ |
@rosen-vladimirov |
|
||
private getProjectData(projectFilePath: string): IFuture<any> { | ||
return (() => { | ||
let fileContent = this.$fs.readJson(projectFilePath).wait(); |
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.
as @teobugslayer pointed, it will be great if you can cache the projectData as well
e6abdc7
to
28ddc2f
Compare
✅ |
👍 after green build |
#587