Add initial package.json
scripts task autodetection (#32497)
Now, every JS/TS-related file will get their package.json script contents added as tasks: <img width="1020" alt="image" src="https://github.com/user-attachments/assets/5bf80f80-fd72-4ba8-8ccf-418872895a25" /> To achieve that, `fn associated_tasks` from the `ContextProvider` was made asynchronous and the related code adjusted. Release Notes: - Added initial `package.json` scripts task autodetection --------- Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
This commit is contained in:
parent
0c0933d1c0
commit
9c513223c4
15 changed files with 782 additions and 661 deletions
|
@ -997,6 +997,7 @@ impl Project {
|
|||
|
||||
let task_store = cx.new(|cx| {
|
||||
TaskStore::local(
|
||||
fs.clone(),
|
||||
buffer_store.downgrade(),
|
||||
worktree_store.clone(),
|
||||
toolchain_store.read(cx).as_language_toolchain_store(),
|
||||
|
@ -1136,6 +1137,7 @@ impl Project {
|
|||
.new(|cx| ToolchainStore::remote(SSH_PROJECT_ID, ssh.read(cx).proto_client(), cx));
|
||||
let task_store = cx.new(|cx| {
|
||||
TaskStore::remote(
|
||||
fs.clone(),
|
||||
buffer_store.downgrade(),
|
||||
worktree_store.clone(),
|
||||
toolchain_store.read(cx).as_language_toolchain_store(),
|
||||
|
@ -1396,6 +1398,7 @@ impl Project {
|
|||
let task_store = cx.new(|cx| {
|
||||
if run_tasks {
|
||||
TaskStore::remote(
|
||||
fs.clone(),
|
||||
buffer_store.downgrade(),
|
||||
worktree_store.clone(),
|
||||
Arc::new(EmptyToolchainStore),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue