File Watcher transpiler for pugJs
Hello, I am stuck at creating a transpiler for pugJs.
Everywhere I've been looking for an answer, people use "jade.cmd", but I have completely no idea how to create that file or what should be inside of it.
I tried searching for jade/pug transpilers, but was unable to find anything.
Currently I am using gulp + cmd to create html files out of pugJs. I would prefer to use built in watcher instead.
请先登录再写评论。
You need installling pug-cli using
(see https://github.com/pugjs/pug)
and then specify %YOUR_HOME%\AppData\Roaming\npm\pug.cmd as a 'program' for your file watcher
Thanks :)
Hi!
I've followed the instructions above but I still can't locate the file to use as a program. I'm using a mac and it creates several pug files inside an .npm folder that exists in a different place than the one mentioned above.
Is there any other way for MacOS?
Thanks!
the location should be
<npm prefix>/bin/pug, like/usr/local/bin/pug(/usr/localis a default npm prefix on OSX)You can run
which pugin terminal to locate the executable, or useto see what npm prefix is being used
Thanks so much Elena!
I also noticed that if I remove that watcher, then add it back again in the same window, it fills that field like you are saying and it works.