什么是SAP Spartacus schematics
发布日期:2021-06-30 14:39:53 浏览次数:2 分类:技术文章

本文共 1131 字,大约阅读时间需要 3 分钟。

https://sap.github.io/spartacus-docs/schematics/

SAP Spartacus Schematics提供了一个向导,能够帮助您将Spartacus libraries安装到自己的Angular项目中。

Schematics提供了命令行的使用方式:

ng add @spartacus/schematics

命令行提供的各种参数:

  • baseUrl sets the base URL of your CX OCC back end.
  • baseSite is a comma-separated list of base site(s) to use with Spartacus.
  • currency is a comma-separated list of currencies to use in Spartacus.
  • language is a comma-separated list of languages to use in Spartacus.
  • occPrefix sets the OCC API prefix, such as /occ/v2/, for example.
  • useMetaTags determines whether or not to configure the baseUrl and mediaUrl in the meta tags from index.html.
  • featureLevel sets the application feature level. The default value is 2.0.
  • overwriteAppComponent overwrites the content of app.component.html. The default value is true.
  • pwa includes progressive web application (PWA) features when building the application.
  • ssr includes the server-side rendering (SSR) configuration.

一个例子:

ng add @spartacus/schematics --baseUrl https://spartacus-demo.eastus.cloudapp.azure.com:8443/ --baseSite=electronics-spa --ssr

通过schematics安装指定版本

ng add @spartacus/schematics@2.1.0

转载地址:https://jerry.blog.csdn.net/article/details/111276502 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:SAP Spartacus的自定义Angular Url Matcher实现
下一篇:SAP Spartacus的Above-the-Fold Loading加载机制

发表评论

最新留言

留言是一种美德,欢迎回访!
[***.207.175.100]2024年04月18日 02时46分35秒