Windows 上的 WebStorm Pug

Pug for WebStorm on Windows

npm install -g pug 作为管理员。但是我不能在命令行上运行 pug 命令。似乎没有安装 pug:

npm config get prefix
C:\Program Files (x86)\Nodist\bin\

此文件夹中没有 pug 文件。

我想在 WebStorm 中使用 pug 作为文件观察器。

为了能够在命令行中 运行 Pug(在文件观察器中使用它),你需要全局安装 pug-cli 包(npm install pug-cli -g),参见 https://github.com/pugjs/pug#command-line.此命令将在 C:\Program Files (x86)\Nodist\bin\ 中安装 pug.cmd(必须已经在您的 %PATH% 中)