If you donβt use any parameters, you can compile jade templates directly in HTML using grunt or gulp and make it monitor file changes
Try it on the command line: jade view/map-beacons.jade -D
If you need to use parameters, I would use something like Andrew Lavers answer.
compileFile returns a function that you can use to pass in parameters ie fn({ myJsVar: 'someValue' })
The command line also has a client option, but I did not find any benefit for this: jade view/map-beacons.jade -cD
Ivenfall
source share