如何正确地在jhipster项目中添加新的指令/组件?我看到您可以运行命令来生成实体和服务,但是没有指令.做这件事的正确方法是什么?
yo jhipster:service bar
yo jhipster:entity <entityName>
我看不出有什么是关于yo :指令或yo :component的。如何创建指令/组件?
文档中列出了常见的可以扩展的子生成器,但我无法让它工作。 我设法使语言、服务器、客户端和其他语言一起工作。 info Using blueprint generator-jhipster-zxc for server subgenerator
This is an existing project, using the configuration from your .yo-rc.json file
to re-generate the project...
info Using blueprint generator-jhipster-zxc for client
我无法使用>jhipster entity book创建实体。Jhipster版本为6.9.1 错误日志 INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:entity book
INFO! Options: from-cli: true
ERROR! The entity generator doesn't support reactive apps with databases of type sql at
获取无法找到应用程序错误,如下所示:
$ jhipster heroku
INFO! Using JHipster version installed globally
INFO! Executing jhipster:heroku
Heroku configuration is starting
✖ Could not find application: geonamesservice
✖ Run the generator again to create a new application
Jhipster生成器说,我应该安装更新:
JHipster更新: 4.5.2 (当前: 4.3.0)
如果我按照建议运行yarn global upgrade generator-jhipster,那么一切都很好。
success Saved 1 new dependency.
└─ generator-jhipster@4.5.2
warning No license field
✨ Done in 3.18s.
但是,如果我试图生成一个新项目,我会再次收到相同的更新消息。希望能在这方面提供任何帮助。
我有一个已存在的项目,运行在潮人3.6.1上,我想把它升级到3.12.2。我遵循了jhipster网站描述的升级过程,但是hipster_upgrade分支仍然提到了子生成器的旧版本。
使用npm的强制更新
在运行以下命令npm install -g generator-jhipster时,它向我展示了以下内容
npm WARN deprecated node-uuid@1.4.7: use uuid module instead npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm an
我在jhipster帮助下创建了实体,并手动修改实体。随着时间的推移,我需要添加更多的字段。我运行jhipster entity Download并一步一步地按照说明进行操作。此后,生成器会说到冲突,并提出完全替换许多文件: conflict .jhipster/Download.json
? Overwrite .jhipster/Download.json? show the differences between the old and the new 那么应该是这样的吗?那么我就不明白是什么代码包含了下面的注释行: @CreatedBy
@ManyToOne
@JsonIgnore
下面是到生成器的回购:的链接
因此,我正在努力制定一份蓝图。我遵循了自述中关于地方发展的步骤。当我尝试运行"jhipster -d --蓝图TestQuestion“时,我得到的信息是:
DEBUG! Found blueprint generator-jhipster-TestQuestion and server with namespace jhipster-TestQuestion:server
WARNING! Error adding current blueprint templates as alternative for JHipster templates.
Err