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.

0
5 comments

You need installling pug-cli using 

npm install pug-cli -g

(see https://github.com/pugjs/pug)

and then specify %YOUR_HOME%\AppData\Roaming\npm\pug.cmd as a 'program' for your file watcher

 

1
Avatar
Permanently deleted user

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!

0

the location should be <npm prefix>/bin/pug, like /usr/local/bin/pug ( /usr/local is a default npm prefix on OSX)

You can run which pug in terminal to locate the executable, or use 

npm config get prefix

to see what npm prefix is being used

 

0
Avatar
Permanently deleted user

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.

 

 

0

Please sign in to leave a comment.