sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 343 forks source link

Jade > Pug #583

Closed 10ko closed 7 years ago

10ko commented 8 years ago

Hi everyone, Do you have any plans at the moment on how/when to migrate from Jade to Pug?

Thanks. E.

frank-dspeed commented 8 years ago

I Migrated it already to pug the main problem would be with that that you then need to explicit call partial.jade .pug because it will loose the ability to auto suggest that all is jade. but it gives also a little trick if you whant to sligthly migrate simply replace var jade= require jade with require pug and your set but then you need to name .jade files .pug to get autorendered

sintaxi commented 8 years ago

I expect we will stick with .jade. Sorry.

frank-dspeed commented 8 years ago

@10ko you could try my fork of it the only diffrents is in multihost there it takes a directory and hosts by domain name so /sites/bla.com gets http://bla.com and server works as expected

# install global
sudo npm install -g dssrv-srv-prerender

# use
# Like harp
prerender server
prerender multihost

#or use it in your script var harp = require('dssrv-srv-prerender')

have fun with it

jonatanpedersen commented 8 years ago

Hi,

One option could be to look at PUG and JADE as completely separate processors and add support for PUG in terraform. There is no reason that this shouldn't work fine in parallel. This gives people a choice of when to upgrade to PUG or maybe to not even upgrade at all. We should wait for pug 2.0.0 though...

https://github.com/jonatanpedersen/terraform/commit/7af10b96845c9bb4f56a1015a1e1929176b16a1f

I can create a pull request if you want when PUG 2.0.0 lands.

frank-dspeed commented 8 years ago

@jonatanpedersen do look into https://github.com/dssrv/srv-prerender (Harp) and https://github.com/dssrv/prerender (terraform the pre processors and that)

simply install global dssrv-srv-prerender and use it like prerender server or prerender multihost

i have integrated it already play around with it and feel free to join the project.

jonatanpedersen commented 8 years ago

@frank-dspeed thanks, well, there you go, you did exactly that :) I will have a look at your project