Open magnuspaaske opened 7 years ago
I'm sitting with an "ancient" project running requirejs and I had to do this in order to be able to use pug-runtime
properly.
pug-runtime/index.js
into a separate folder $FOLDER
require('fs')
line in index.js
r.js -convert $FOLDER outputFileName
r.js
is a super silly tool when it comes to parsing args) and rename it to pug-runtime.amd.js
or somethingThe latest version of pug automatically generates the required runtime functions inline, so you shouldn’t need to reference pug-runtime. If you want to as a performance optimisation (if your app has a lot of pug templates), any CommonJS loader should work fine.
Hey
I hadn't seen this project after pug was renamed from jade, but I had been using jade-runtime before. I was thinking why there's no browser optimized version of the runtime so that it can be dropped into a project with no problems (preferably loaded from bower).
Not sure how it could best be done but I assume the main file could simply be used as a basis. Currently when I compile pug I need to add the functions anyways but it would be better to add it based on the common master.
/Magnus