如何为Phoenix创建一个TypeScript监视器?

huangapple go评论60阅读模式
英文:

How to create a typescript watcher for phoenix?

问题

我尝试过:

  watchers: [
    esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
    tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]},
    tsc: ["--noEmit --watch"]
  ]

但似乎不起作用。我不确定我漏掉了什么。

英文:

I tried:

  watchers: [
    esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
    tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]},
    tsc: ["--noEmit --watch"]
  ]

But that doesn't appear to work. I am not sure what I am missing.

答案1

得分: 1

我明白了

  watchers: [
    ...
    typescript: [
      ".assets/node_modules/typescript/bin/tsc",
      "--noEmit",
      "--watch"
    ]
  ]
英文:

Ah I got it

  watchers: [
    ...
    typescript: [
      ".assets/node_modules/typescript/bin/tsc",
      "--noEmit",
      "--watch"
    ]
  ]

huangapple
  • 本文由 发表于 2023年6月8日 08:49:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76427953.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定