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.
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.
Suggestion to add some JSDoc style comments to explain new classes/functions
kathrynkodama
left a comment
There was a problem hiding this comment.
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.
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
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.
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.
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.
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.
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.