Closed JuggernautJf closed 5 months ago
You appear to have included your node_modules folder? As well as your dist folder?
You appear to have included your node_modules folder? As well as your dist folder?
thanks added gitignore 👍 i'm not able to find any nice videos on gitignore, can somebody provide one?
Yea This is Good enough for today...
[x] added ts and js "seamless" support
[x] added SetupFiles command => "bizzaro-devin.createFiles" -- [ ] adds index.html with boilerPlate -- [ ] adds sketch.js
Thank you @JuggernautJf for contributing! Wow, I can see you've done a lot of work here! At the moment, this project is less about being a proper VS Code extension and more an odd experiment for a performance coming up in April. So I am not prioritizing things like typescript or proper software engineering principles at this time. For contributing I would suggest opening issues with proposals first and implementing small, incremental changes in pull requests!
Open to considering the work you have done here of course, and thank you for your efforts and generosity!
@shiffman you should try it
@shiffman How i create file in workspace: createFile.js
import vscode from 'vscode';
/**
* Creates a file with the given relative path and optional content.
*
* @param {string} path - The relative path of the file to be created.
* @param {string} [content] - The content to be written to the file. Optional, defaults to an empty string.
* @return {Promise<void>} - A promise that resolves when the file is created successfully.
* @param {boolean} options.show - set true to open file
*/
export default async (path, content = "",options={}) => {
const activeFolder = vscode.workspace.workspaceFolders?.[0];
const FilePath = vscode.Uri.joinPath(activeFolder.uri, path);
const FileContent = new TextEncoder().encode(content);
await vscode.workspace.fs.writeFile(FilePath, FileContent);
if (options.show) {
const document = await vscode.workspace.openTextDocument(FilePath);
await vscode.window.showTextDocument(document);
}
};
extension.js
import createFile from 'utils/createFile.js'
const createIndexHtml = async() => await createFile('index.html',
`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>`);
const createSketchJs = async() => await createFile('sketch.js',"",{show : true});
added ts supports along with js figured out the way to use type: "module"