From 5ffd569fd8047544fb4336f505430806e28cb3a4 Mon Sep 17 00:00:00 2001
From: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com>
Date: Sat, 25 Jan 2025 00:01:40 +0700
Subject: [PATCH 1/3] Fixed npm run watch bug for first time builders by
checking if src2 folder already exists, and if not then create it first
before setting up the watchers
---
CONTRIBUTING.md | 8 ++++----
.../contrib/void/browser/react/build.js | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 151badfc8..c3fb20e54 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,7 +3,7 @@
Welcome! 👋 This is the official guide on how to contribute to Void. We want to make it as easy as possible to contribute, so if you have any questions or comments, reach out via email or discord!
-If you'd like to get started developing Void, feel free to follow the steps below on building Void yourself and doing a PR.
+If you'd like to get started developing Void, feel free to follow the steps below on building Void yourself and doing a PR.
Void's code mostly lives in `src/vs/workbench/contrib/void/` and `src/vs/platform/void/`.
There are a few ways to contribute:
@@ -47,7 +47,7 @@ First, run `npm install -g node-gyp`. Then:
To build Void, open `void/` inside VSCode. Then open your terminal and run:
1. `npm install` to install all dependencies.
-2. `npm run watchreact` to build Void's browser dependencies like React. (If this doesn't work, try `npm run buildreact`).
+2. `npm run watchreact` to build Void's browser dependencies like React.
3. Build Void.
- Press Cmd+Shift+B (Mac).
- Press Ctrl+Shift+B (Windows/Linux).
@@ -111,7 +111,7 @@ workspace/
```
### Distributing
-Void's maintainers distribute Void on our website and in releases. If you'd like to see the scripts to convert `Mac .app -> .dmg`, `Windows folder -> .exe`, and `Linux folder -> appimage` for distribution, feel free to reach out.
+Void's maintainers distribute Void on our website and in releases. If you'd like to see the scripts to convert `Mac .app -> .dmg`, `Windows folder -> .exe`, and `Linux folder -> appimage` for distribution, feel free to reach out.
## Pull Request Guidelines
@@ -123,7 +123,7 @@ Void's maintainers distribute Void on our website and in releases. If you'd like
## Codebase Guide
-We highly recommend reading [this](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) article on VSCode's sourcecode organization.
+We highly recommend reading [this](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) article on VSCode's sourcecode organization.
We are currently putting together our own articles on VSCode and Void's sourcecode organization. The best way to get this information right now is by attending a weekly meeting.
diff --git a/src/vs/workbench/contrib/void/browser/react/build.js b/src/vs/workbench/contrib/void/browser/react/build.js
index 436d10ce8..4fc90f293 100755
--- a/src/vs/workbench/contrib/void/browser/react/build.js
+++ b/src/vs/workbench/contrib/void/browser/react/build.js
@@ -80,6 +80,22 @@ const args = process.argv.slice(2);
const isWatch = args.includes('--watch') || args.includes('-w');
if (isWatch) {
+
+ // Check if src2/ exists; if not, do an initial scope-tailwind build
+ if (!fs.existsSync('src2')) {
+ try {
+ console.log('🔨 Running initial scope-tailwind build to create src2 folder...');
+ execSync(
+ 'npx scope-tailwind ./src -o src2/ -s void-scope -c styles.css -p "void-"',
+ { stdio: 'inherit' }
+ );
+ console.log('✅ src2/ created successfully.');
+ } catch (err) {
+ console.error('❌ Error running initial scope-tailwind build:', err);
+ process.exit(1);
+ }
+ }
+
// Watch mode
const scopeTailwindWatcher = spawn('npx', [
'nodemon',
From 5589b2e302b0ee911a7a38a256179f616db0f9f0 Mon Sep 17 00:00:00 2001
From: Andrew Pareles
Date: Tue, 28 Jan 2025 20:02:15 -0800
Subject: [PATCH 2/3] updates
---
CONTRIBUTING.md | 2 +-
src/vs/workbench/contrib/void/browser/react/build.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c3fb20e54..919df0206 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -47,7 +47,7 @@ First, run `npm install -g node-gyp`. Then:
To build Void, open `void/` inside VSCode. Then open your terminal and run:
1. `npm install` to install all dependencies.
-2. `npm run watchreact` to build Void's browser dependencies like React.
+2. `npm run watchreact` to build Void's browser dependencies like React. (If this doesn't work, try `npm run buildreact`).
3. Build Void.
- Press Cmd+Shift+B (Mac).
- Press Ctrl+Shift+B (Windows/Linux).
diff --git a/src/vs/workbench/contrib/void/browser/react/build.js b/src/vs/workbench/contrib/void/browser/react/build.js
index 4fc90f293..ece3ebf68 100755
--- a/src/vs/workbench/contrib/void/browser/react/build.js
+++ b/src/vs/workbench/contrib/void/browser/react/build.js
@@ -80,7 +80,7 @@ const args = process.argv.slice(2);
const isWatch = args.includes('--watch') || args.includes('-w');
if (isWatch) {
-
+ // this just builds it if it doesn't exist instead of waiting for the watcher to trigger
// Check if src2/ exists; if not, do an initial scope-tailwind build
if (!fs.existsSync('src2')) {
try {
From 48638027135026ca3dad4c4fcade89cf752b2d06 Mon Sep 17 00:00:00 2001
From: Andrew Pareles
Date: Tue, 28 Jan 2025 20:02:57 -0800
Subject: [PATCH 3/3] contrib
---
CONTRIBUTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 919df0206..c3fb20e54 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -47,7 +47,7 @@ First, run `npm install -g node-gyp`. Then:
To build Void, open `void/` inside VSCode. Then open your terminal and run:
1. `npm install` to install all dependencies.
-2. `npm run watchreact` to build Void's browser dependencies like React. (If this doesn't work, try `npm run buildreact`).
+2. `npm run watchreact` to build Void's browser dependencies like React.
3. Build Void.
- Press Cmd+Shift+B (Mac).
- Press Ctrl+Shift+B (Windows/Linux).