From 68722ee5c3d0b6c1f7ff3d358e5fff951eefb348 Mon Sep 17 00:00:00 2001 From: Praveen Naik Date: Fri, 3 Jan 2025 21:04:54 +0530 Subject: [PATCH 1/8] Update CONTRIBUTING.md Added details about Bundling output. Most of us open only the repo without workspace to save memory. It's easy to miss out on where the bundle is located. Added clarity --- CONTRIBUTING.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c770973..1931c1e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,7 +83,16 @@ Alternatively, if you want to build Void from the terminal, instead of pressing ## Bundling -We don't usually recommend bundling. Instead, you should probably just build. If you're sure you want to bundle Void into an executable app, make sure you've built first, then run one of the following commands. This will create a folder named `VSCode-darwin-arm64` (or similar) in the repo's parent's directory. Be patient - compiling can take ~25 minutes. +We don't usually recommend bundling. Instead, you should probably just build. If you're sure you want to bundle Void into an executable app, make sure you've built first, then run one of the following commands. This will create a folder named `VSCode-darwin-arm64` (or similar) in the repo's parent's directory(Refer the Folder structure below). Be patient - compiling can take ~25 minutes. + +```bash +workspace/ +├── void/ # Your Void Fork +├── VSCode-linux-x64/ # Build folder generated outside of void for Linux +└── VSCode-darwin-arm64/ # Build folder generated outside of void for MacOs + +``` + ### Mac - `npm run gulp vscode-darwin-arm64` - most common (Apple Silicon) From fae03c30607d825d1fa179544a358a3e07cb8b02 Mon Sep 17 00:00:00 2001 From: Andrew Pareles <43356051+andrewpareles@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:44:12 -0800 Subject: [PATCH 2/8] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1931c1e8..488ed5c4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,13 +83,13 @@ Alternatively, if you want to build Void from the terminal, instead of pressing ## Bundling -We don't usually recommend bundling. Instead, you should probably just build. If you're sure you want to bundle Void into an executable app, make sure you've built first, then run one of the following commands. This will create a folder named `VSCode-darwin-arm64` (or similar) in the repo's parent's directory(Refer the Folder structure below). Be patient - compiling can take ~25 minutes. +We don't usually recommend bundling. Instead, you should probably just build. If you're sure you want to bundle Void into an executable app, make sure you've built first, then run one of the following commands. This will create a folder named `VSCode-darwin-arm64` or similar outside of the void/ repo (see below). Be patient - compiling can take ~25 minutes. ```bash workspace/ ├── void/ # Your Void Fork ├── VSCode-linux-x64/ # Build folder generated outside of void for Linux -└── VSCode-darwin-arm64/ # Build folder generated outside of void for MacOs +└── VSCode-darwin-arm64/ # Build folder generated outside of void for Mac ``` From fb48c4e67e973944060fd8ce1e6efad632411ae7 Mon Sep 17 00:00:00 2001 From: Andrew Pareles <43356051+andrewpareles@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:15:55 -0800 Subject: [PATCH 3/8] Update VOID_USEFUL_LINKS.md --- VOID_USEFUL_LINKS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VOID_USEFUL_LINKS.md b/VOID_USEFUL_LINKS.md index b3ba5a30..abf9a6e4 100644 --- a/VOID_USEFUL_LINKS.md +++ b/VOID_USEFUL_LINKS.md @@ -32,6 +32,6 @@ Void is no longer an extension, so these links are no longer required, but they - [The Full VSCode Extension API](https://code.visualstudio.com/api/references/vscode-api) - look on the right side for organization. The [bottom](https://code.visualstudio.com/api/references/vscode-api#api-patterns) of the page is easy to miss but is useful - cancellation tokens, events, disposables. -- [Activation events](https://code.visualstudio.com/api/references/activation-events) you can define in `package.json` (not the most useful) +- [Activation events](https://code.visualstudio.com/api/references/activation-events) you can define in `package.json` (not the most useful). From dd204978e5c45cb7b821823f7c8f4fef16036fbc Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Fri, 3 Jan 2025 13:31:51 -0800 Subject: [PATCH 4/8] update lock --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a54fcf0..1c1b3eb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "void-dev", - "version": "1.0.0", + "version": "1.94.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "void-dev", - "version": "1.0.0", + "version": "1.94.0", "hasInstallScript": true, "license": "MIT", "dependencies": { From cc177b9cd4b0713046a9fb55ec8d95f3f50e2085 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Fri, 3 Jan 2025 14:14:37 -0800 Subject: [PATCH 5/8] update package --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d0677769..443e9329 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,10 @@ "productName": "Void", "version": "1.94.0", "distro": "this is a commit number if we want to publish on npm", + "homepage": "https://voideditor.com", "author": { - "name": "Glass Devtools, Inc." + "name": "Glass Devtools, Inc.", + "email": "andrew@voideditor.com" }, "license": "MIT", "main": "./out/main", From b677d3dfc1f9f29e76c4244c7f3e76b91c8044d5 Mon Sep 17 00:00:00 2001 From: Andrew Pareles <43356051+andrewpareles@users.noreply.github.com> Date: Fri, 3 Jan 2025 17:18:18 -0800 Subject: [PATCH 6/8] Update CONTRIBUTING.md --- CONTRIBUTING.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 488ed5c4..f911ae3d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,14 +85,6 @@ Alternatively, if you want to build Void from the terminal, instead of pressing We don't usually recommend bundling. Instead, you should probably just build. If you're sure you want to bundle Void into an executable app, make sure you've built first, then run one of the following commands. This will create a folder named `VSCode-darwin-arm64` or similar outside of the void/ repo (see below). Be patient - compiling can take ~25 minutes. -```bash -workspace/ -├── void/ # Your Void Fork -├── VSCode-linux-x64/ # Build folder generated outside of void for Linux -└── VSCode-darwin-arm64/ # Build folder generated outside of void for Mac - -``` - ### Mac - `npm run gulp vscode-darwin-arm64` - most common (Apple Silicon) @@ -108,6 +100,16 @@ workspace/ - `npm run gulp vscode-linux-ia32` +### Output + +This will generate a folder outside of `void/`: +```bash +workspace/ +├── void/ # Your Void fork +└── VSCode-darwin-arm64/ # Generated output +``` + + # Guidelines From 85c2c80db071b183592d5463d33ac97c5e1c39eb Mon Sep 17 00:00:00 2001 From: Andrew Pareles <43356051+andrewpareles@users.noreply.github.com> Date: Sat, 4 Jan 2025 23:55:52 -0800 Subject: [PATCH 7/8] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 0cbc373e..a4fbc384 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ To build and run Void, follow the steps in [`CONTRIBUTING.md`](https://github.co ## Reference -Void is a fork of the of [vscode](https://github.com/microsoft/vscode) repository. -For some useful links on VSCode, see [`VOID_USEFUL_LINKS.md`](https://github.com/voideditor/void/blob/main/VOID_USEFUL_LINKS.md). +Void is a fork of the of [vscode](https://github.com/microsoft/vscode) repository. For some useful links on VSCode, see [`VOID_USEFUL_LINKS.md`](https://github.com/voideditor/void/blob/main/VOID_USEFUL_LINKS.md). ## Support Feel free to reach out in our [Discord](https://discord.gg/RSNjgaugJs) server or contact us via email. From 5083b8e971e48ae1001e5c8ceee7b010bcea3640 Mon Sep 17 00:00:00 2001 From: Raz Luvaton <16746759+rluvaton@users.noreply.github.com> Date: Mon, 6 Jan 2025 04:00:40 +0200 Subject: [PATCH 8/8] fix react build.js to properly find the base folder (#203) --- .../contrib/void/browser/react/build.js | 61 ++++++++++++++++--- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/build.js b/src/vs/workbench/contrib/void/browser/react/build.js index 0bf84bfc..4360e859 100755 --- a/src/vs/workbench/contrib/void/browser/react/build.js +++ b/src/vs/workbench/contrib/void/browser/react/build.js @@ -11,23 +11,64 @@ import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const __void_name = 'void' + +function doesPathExist(filePath) { + try { + const stats = fs.statSync(filePath); + + return stats.isFile(); + } catch (err) { + if (err.code === 'ENOENT') { + return false; + } + throw err; + } +} + +/* + +This function finds `globalDesiredPath` given `localDesiredPath` and `currentPath` + +Diagram: + +...basePath/ +└── void/ + ├── ...currentPath/ (defined globally) + └── ...localDesiredPath/ (defined locally) + +*/ +function findDesiredPathFromLocalPath(localDesiredPath, currentPath) { + + // walk upwards until currentPath + localDesiredPath exists + while (!doesPathExist(path.join(currentPath, localDesiredPath))) { + const parentDir = path.dirname(currentPath); + + if (parentDir === currentPath) { + return undefined; + } + + currentPath = parentDir; + } + + // return the `globallyDesiredPath` + const globalDesiredPath = path.join(currentPath, localDesiredPath) + return globalDesiredPath; +} // hack to refresh styles automatically function saveStylesFile() { setTimeout(() => { try { - // Find "void" in __dirname and use that as our base: - const voidIdx = __dirname.indexOf(__void_name); - const baseDir = __dirname.substring(0, voidIdx + __void_name.length); - const target = path.join( - baseDir, - 'src/vs/workbench/contrib/void/browser/react/src2/styles.css' - ); + const pathToCssFile = findDesiredPathFromLocalPath('./src/vs/workbench/contrib/void/browser/react/src2/styles.css', __dirname); + + if (pathToCssFile === undefined) { + console.error('[scope-tailwind] Error finding styles.css'); + return; + } // Or re-write with the same content: - const content = fs.readFileSync(target, 'utf8'); - fs.writeFileSync(target, content, 'utf8'); + const content = fs.readFileSync(pathToCssFile, 'utf8'); + fs.writeFileSync(pathToCssFile, content, 'utf8'); console.log('[scope-tailwind] Force-saved styles.css'); } catch (err) { console.error('[scope-tailwind] Error saving styles.css:', err);