Can I configure Jade to generate readable well-indentated HTML code rather than single-line stream?

StackOverflow https://stackoverflow.com/questions/23209165

  •  07-07-2023
  •  | 
  •  

문제

I am exploring Node, Express and Jade and have found it generating single-line concatenated HTML code line. Needless to say this is quite an inconvenience when the task is to explore how the things work and debug my first apps. Can it be configured to generate code intended for a human to read? I mean with tags starting on new lines and tags hierarchy outlined with reasonable indentation?

도움이 되었습니까?

해결책

If you are using jade API, you can use jade.compile(template, { pretty: true })(model).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top