快速发电机无玉 [英] Express Generator Without Jade

查看:177
本文介绍了快速发电机无玉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用快速生成器生成一个快速骨架。
那么就是这样的:

  $ npm install express-generator -g 

但是,它添加了一堆自动玉石文件。



我想知道是否有办法摆脱这些玉器文件,只需使用html与express generator



谢谢!

解决方案

在命令提示符下尝试此命令



express --help,它会给你以下





上面的图像给出了查看引擎的列表,现在
,只需键入


express - {your选择查看引擎}

例如,express -e


这将设置 EJS 作为您的视图处理程序并删除玉。 EJS具有HTML的外观和感觉,增加了通过其模板系统注入值的功能。


I am trying to generate an express skeleton, using the express generator. So it would be this:

$ npm install express-generator -g

However, it adds a bunch of automatic jade files.

I was wondering if there was a way to get rid of those jade files and just using html with the express generator

Thanks!

解决方案

Try this command in command prompt,

express --help, it will give you the following

The above image gives you the list of "view engines", now, simply type

express -{your choice view engine}
For example, express -e

This sets the EJS as your view handler and removes jade. EJS has the look and feel of HTML with the added ability to inject values via their template system.

这篇关于快速发电机无玉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆