-
Notifications
You must be signed in to change notification settings - Fork 34
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
Open liberty starter #112
base: main
Are you sure you want to change the base?
Open liberty starter #112
Conversation
src/liberty/multiStepInput.ts
Outdated
import * as vscode from "vscode"; | ||
import * as fs from "fs"; | ||
|
||
export async function multiStepInput(context: ExtensionContext) { |
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 class uses tabs for indents but starterOptions.ts
uses 4 spaces for indents. To keep consistent let's keep using 4 spaces for indents. Some existing classes may need updating to keep consistent, offhand I noticed libertyProject.ts
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.
Suggestion to add some JSDoc style comments to explain new classes/functions
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.
Please merge the latest from main to this branch
import * as vscode from "vscode"; | ||
import * as fs from "fs"; | ||
|
||
export async function starterProject(context: ExtensionContext) { |
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.
Indentation looks off in this file, ensure you are using 4 spaces rather than tabs.
Suggestion to add a comment to the class explaining the purpose
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.
Fixed in fb3698a. Comments on the way..
src/liberty/devCommands.ts
Outdated
fs.createReadStream(downloadLocation).pipe(unzip.Extract({ path: `${state.dir}/${state.a}`})); | ||
fs.unlink(downloadLocation, async (err) => { | ||
const folderUri = vscode.Uri.file(state.dir); | ||
if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders[0].uri.fsPath != state.dir) { |
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.
Is the idea here that if the workspace is empty we automatically add the newly generated project to the current workspace?
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.
Yes, if it's empty or the target dir is the same as the currrent, then we don't ask to open in a new window.
src/liberty/devCommands.ts
Outdated
var unzip = require("unzip-stream"); | ||
fs.createReadStream(downloadLocation).pipe(unzip.Extract({ path: `${state.dir}/${state.a}`})); | ||
fs.unlink(downloadLocation, async (err) => { | ||
const folderUri = vscode.Uri.file(state.dir); |
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 seems to open the parent folder of the newly generated project rather than the newly generated project. For example, if I generate into my downloads, my entire downloads folder is opened in VS Code rather than just the app-name
project I generated
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.
Fixed in fb3698a. Not sure if it is the flow we are looking for. I also used a timeout to refresh the file explore. I'll go back and use async/await, when I have more time.
sed -i '' 's/\t/ /g' <path>
No description provided.