Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements #974

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Among other things, Workbench comes with
- JavaScript, Rust, Python and Vala support
- Declarative user interface syntax
- Autosave, sessions and projects
- Code linter and formatter
- Code diagnostics, completion and formatter
- Terminal output

ℹ️ Workbench is made possible by Flatpak. Only Flathub Workbench is supported.
Expand Down
2 changes: 1 addition & 1 deletion data/app.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<li>JavaScript, Rust, Python and Vala support</li>
<li>Declarative user interface syntax</li>
<li>Autosave, sessions and projects</li>
<li>Code linter and formatter</li>
<li>Code diagnostics, completion and formatter</li>
<li>Terminal output</li>
</ul>
</description>
Expand Down
2 changes: 1 addition & 1 deletion demos
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 10 additions & 14 deletions src/cli/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function main([action, ...args]) {

if (action === "ci") {
const filenames = args;
const success = await ci({ filenames, current_dir });
const success = await ci({ filenames });
return success ? 0 : 1;
}

Expand All @@ -43,12 +43,10 @@ export async function main([action, ...args]) {
}

if (lang.id === "vala") {
const api_file = (
GLib.getenv("FLATPAK_ID")
? Gio.File.new_for_path(pkg.pkgdatadir)
: current_dir.resolve_relative_path("src/langs/vala")
).get_child("workbench.vala");
api_file.copy(
const file_api = Gio.File.new_for_path(pkg.pkgdatadir).get_child(
"workbench.vala",
);
file_api.copy(
current_dir.get_child("workbench.vala"),
Gio.FileCopyFlags.OVERWRITE,
null,
Expand Down Expand Up @@ -122,7 +120,7 @@ async function checkFile({ lspc, file, lang, uri }) {
}
}

async function ci({ filenames, current_dir }) {
async function ci({ filenames }) {
for (const filename of filenames) {
const demo_dir = Gio.File.new_for_path(filename);

Expand Down Expand Up @@ -354,12 +352,10 @@ async function ci({ filenames, current_dir }) {
const languageId = "vala";
let version = 0;

const api_file = (
GLib.getenv("FLATPAK_ID")
? Gio.File.new_for_path(`/app/share/${GLib.getenv("FLATPAK_ID")}`)
: current_dir.resolve_relative_path("src/langs/vala")
).get_child("workbench.vala");
api_file.copy(
const file_api = Gio.File.new_for_path(pkg.pkgdatadir).get_child(
"workbench.vala",
);
file_api.copy(
demo_dir.get_child("workbench.vala"),
Gio.FileCopyFlags.OVERWRITE,
null,
Expand Down
2 changes: 1 addition & 1 deletion src/init.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "gi://GIRepository?version=2.0";
import Gtk from "gi://Gtk";
import Gtk from "gi://Gtk?version=4.0";
import Source from "gi://GtkSource";
import Adw from "gi://Adw";
import Vte from "gi://Vte";
Expand Down
Loading