安装脚手架工具
npm install -g yo
- 9.x
npm install -g @mendix/generator-widget@9.0.2
- 8.x
npm install -g @mendix/generator-widget@8.18.0
生成脚手架代码
yo @mendix/widget MyWidgetName
? What is the name of your widget
MyWidgetName
? Enter a description for your widgetMy widget description
? Organization nameMendix
? Add a copyright2020 Mendix Technology BV
? Add a licenseApache-2.0
? Initial version1.0.0
? AuthorJohn
? Mendix project path./tests/testProject
? Which programming language do you want to use for the widget?TypeScript
? Which type of widget are you developing?For web and hybrid mobile apps
? Which template do you want to use for the widget?Empty widget (recommended for more experienced developers)
? Add unit tests for the widget ? (recommended for Full Boilerplate)No
? Add End-to-end tests for the widget ? (recommended for Full Boilerplate)No