Skip to content

Commit f510dc4

Browse files
committed
Automate Setup & Codespaces
1 parent a646398 commit f510dc4

4 files changed

Lines changed: 26 additions & 19 deletions

File tree

‎.devcontainer/devcontainer.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"version": "21"
1414
}
1515
},
16-
"postAttachCommand": "bash ./setup.sh"
16+
"postAttachCommand": "bash ./setup.sh",
17+
"workspaceFolder": "/workspaces/liquidjava-demo/examples/demo"
1718
}

‎README.md‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,17 @@ For more information about LiquidJava, visit our [website](https://catarinagambo
1212

1313
### Setup Instructions
1414

15-
#### Option 1: Using Codespaces or Dev Containers (Recommended)
15+
#### Option 1: Using Codespaces (Recommended)
1616

17-
1. Open the repository in GitHub Codespaces or use VS Code's "Remote-Containers: Open Folder in Container" command.
18-
2. Install the extension: View → Extensions → Click on the "..." (More Actions) button → Install from VSIX → `/workspaces/liquidjava-examples/extension/liquid-java-0.0.15.vsix`.
19-
3. After the information that the extension is activated, do `Ctrl + Shift + P` and write `Developer: Reload Window `
20-
5. Open examples: File → Open Folder → `examples/demo/src/`.
21-
6. You can try changing the example to see an error appear.
22-
7. If needed, reload window again using `Developer: Reload Window `.
17+
- To use codespaces, make sure you’re logged in to GitHub, click the button below, select `4-core`, and then press `Create codespace`. After a few minutes an editor with the LiquidJava extension enabled will open in your browser.
2318

19+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/rcosta358/liquidjava-examples)
2420

25-
#### Extension Activation
21+
#### Option 2: Using Dev Containers
2622

27-
- The extension may take some time to be activated. While a small wheel in the bottom right of VS Code window is spinning, the extension is being loaded.
28-
- The extension will only activate when opening a Java project with the liquidjava-api.jar present.
29-
23+
- If you prefer to test it locally, you can use VS Code's Dev Containers. Make sure you have Docker and the Dev Containers extension installed in VS Code and use the "Remote-Containers: Open Folder in Container" command. Then, run the `./setup.sh` script in the terminal to install the extension.
3024

31-
#### Option 2: Manual Setup
25+
#### Option 3: Manual Setup
3226

3327
If the automatic setup didn't work correctly, follow these manual steps:
3428

@@ -66,6 +60,12 @@ If the automatic setup didn't work correctly, follow these manual steps:
6660

6761
### Troubleshooting
6862

63+
##### Extension Activation
64+
65+
- The extension displays an item in the status bar at the bottom left of VS Code, indicating its current state.
66+
- The extension will only activate when opening a Java project with the `liquidjava-api.jar` present in the workspace.
67+
- If the extension doesn't activate properly, do `Ctrl + Shift + P` and run `Developer: Reload Window`.
68+
6969
#### VSIX File Issues
7070

7171
If you see "End of central directory record signature not found" or similar errors:
@@ -80,7 +80,6 @@ If you see "End of central directory record signature not found" or similar erro
8080
cat ./extension/liquid-java-0.0.15.vsix | head
8181
```
8282

83-
8483
## Working with the Extension
8584

8685
1. Ensure your project is correctly set up with the `liquidjava-api.jar`.

‎extension/liquid-java-0.0.15.vsix‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:f50a6b69bba572d93307ad9b632a0bde81403191488add5507f09c20b496559e
3-
size 137035339
2+
oid sha256:64ef446a47ddf814049c569dbc11039ac5e08b005a8cf3a5a5bb909b75864c95
3+
size 209253467

‎setup.sh‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ else
3838
find . -type d -maxdepth 2 | sort
3939
fi
4040

41-
echo "🎉 Setup complete! Please follow these manual steps:"
42-
echo "1. Install the extension: View → Extensions → ... → Install from VSIX → extension/liquid-java-0.0.15.vsix"
43-
echo "2. Open examples: File → Open Folder → examples/demo/src/"
41+
# Install extension
42+
echo "🔧 Installing LiquidJava VSCode extension..."
43+
code --install-extension ./extension/liquid-java-0.0.15.vsix
44+
if [ $? -eq 0 ]; then
45+
echo "✅ Extension installed successfully"
46+
else
47+
echo "❌ Failed to install the extension"
48+
fi
49+
50+
echo "🎉 Setup complete!"

0 commit comments

Comments
 (0)