Skip to Content
Technical Articles
Author's profile photo Tia Xu

如何在 Business Application Studio (BAS) 中手动安装 Yeoman 生成器

SAP Business Application Studio 扩展框架允许您添加新的项目和模块模板,以简化项目创建。您可以使用工具来丰富 IDE,这些工具可帮助您更快、更高效地进行开发,例如代码辅助、静态代码分析和代码格式化。同样,您可以将 IDE 与外部服务和系统集成。

该扩展框架允许您以两种不同的方式扩展 SAP Business Application Studio:

  • 使用 VS Code 扩展和 Yeoman 生成器扩展特定开发空间。

  • 创建自己的 SAP Business Application Studio 扩展

因此,您可以使用 BAS 的Explore and Install Generators功能来访问第三方站点,以便查看和下载开源、第三方或其自己的工具,或者库、软件组件(“扩展包”)到 BAS 的开发空间内。

使用 Explore and Install Generators 的 UI 来安装 Yeoman Generators

执行BAS command Explore and Install Generators,并安装所需要的generator:

安装完成后,就可以利用该generator来快速创建项目了。可以通过执行BAS command Open Template Wizard或者Yeoman CLI的方式创建项目:

更多信息: Explore and Install Generators

手动安装 Yeoman 生成器

您也可以直接通过 Yeoman CLI 安装生成器。

如果您的默认npm registry不包含yeoman-generator API,请首先将 npm registry设置为:https://registry.npmjs.org/

npm config set registry https://registry.npmjs.org/

在BAS中打开一个终端:

在终端中执行以下命令,并选择 Install a generator 以及你想要安装的生成器:

yo

例如,我们随机选择一个生成器,叫做: generator-js:

安装完成后,您就可以利用该generator来快速创建项目了。

可以通过执行BAS command Open Template Wizard的方式看到并创建项目:

或者,可以通过Yeoman CLI来创建项目:

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo 通哥儿 c
      通哥儿 c

      你好,姐,可以加个微信不,SAP-MM