From 23f37e94ee9de467646a107def445072ab95bb92 Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Sun, 23 Feb 2025 12:02:46 +0100 Subject: [PATCH] feat: basic tasks done with dependencies over Zed env variables --- settings.json | 5 +-- tasks.json | 71 ++++++++++++++++++++++-------------------- tasks/build-migrate.sh | 3 ++ 3 files changed, 44 insertions(+), 35 deletions(-) create mode 100644 tasks/build-migrate.sh diff --git a/settings.json b/settings.json index d5b0069..b4c8b07 100644 --- a/settings.json +++ b/settings.json @@ -41,7 +41,7 @@ "features": { "edit_prediction_provider": "none" }, - "tab_size": 4, // May cause errors on colaborative projects wrongly configured + // "tab_size": 4, // May cause errors on colaborative projects wrongly configured "git": { "git_gutter": "tracked_files", "inline_blame": { @@ -203,7 +203,8 @@ }, "env": { "ZED": "1", - "EXAMPLE": "test:dqnid" + "EXAMPLE": "test:dqnid", + "BLUEPRINTS_PATHS": "./.blueprints" }, "font_family": null, "font_features": null, diff --git a/tasks.json b/tasks.json index b94f4eb..f2677c2 100644 --- a/tasks.json +++ b/tasks.json @@ -3,38 +3,43 @@ // │- author: Daniel Heras Quesada │ // ╰───────────────────────────────╯ [ - { - "label": "Example task", - "command": "for i in {1..5}; do echo \"Hello $i/5\"; sleep 1; done", - "env": { - "foo": "bar" - }, - "use_new_terminal": false, - "allow_concurrent_runs": false, - "reveal": "always", - "hide": "never", - "shell": "system" + { + "label": "Example task", + "command": "for i in {1..5}; do echo \"Hello $i/5\"; sleep 1; done", + "env": { + "foo": "bar" }, - { - "label": "Build migrate", - "command": "cd code; npm run build-migrate", - "use_new_terminal": true, - "allow_concurrent_runs": false, - "reveal": "always", - "hide": "never", - "shell": "system" - }, - { - "label": "Lazygit", - "command": "lazygit", - "args": [], - "env": {}, - "use_new_terminal": true, - "allow_concurrent_runs": false, - "actions": [ - { - "action": "workspace::OpenFullScreen" - } - ] - } + "use_new_terminal": false, + "allow_concurrent_runs": false, + "reveal": "always", + "hide": "never", + "shell": "system" + }, + { + "label": "Build migrate", + "command": "bash ~/.config/zed/tasks/build-migrate.sh", + "use_new_terminal": true, + "allow_concurrent_runs": false, + "reveal": "always", + "hide": "never", + "shell": "system" + }, + { + "label": "Lazygit", + "command": "lazygit", + "args": [], + "env": {}, + "use_new_terminal": true, + "allow_concurrent_runs": false, + "reveal_target": "center" + }, + { + "label": "Blueprints", + "command": "~/Packages/code-templates/code_templates", + "use_new_terminal": true, + "allow_concurrent_runs": false, + "reveal": "always", + "hide": "never", + "shell": "system" + } ] diff --git a/tasks/build-migrate.sh b/tasks/build-migrate.sh new file mode 100644 index 0000000..ca2efd0 --- /dev/null +++ b/tasks/build-migrate.sh @@ -0,0 +1,3 @@ +[ '$(basename "$PWD")' != 'code' ] && cd code +npm run build-migrate +date +"%T"