Salesforce学习 Lwc开发基础 (资源取得)

2021-01-06 10:45:30 浏览数 (1)

我们使用VsCode连接到一个SandBox之后,需要从开发环境取得已经存在的LightningWebComponent,最好用的是使用命令【force:source:retrieve】,这样可以快速把资源取下来。

例:

sfdx force:source:retrieve -m LightningComponentBundle

单个自定义项目取得:

代码语言:javascript复制
sfdx force:source:retrieve -m CustomField:Boat__c.Boat_Image__c

Object全体项目取得:

代码语言:javascript复制
sfdx force:source:retrieve -m "CustomObject:Boat__c"

其它常用资源取得命令总结如下:

代码语言:javascript复制
sfdx force:source:retrieve -m LightningComponentBundle
sfdx force:source:retrieve -m ApexTrigger,ApexClass,ApexPage
sfdx force:source:retrieve -m AuraDefinitionBundle
sfdx force:source:retrieve -m QuickAction
sfdx force:source:retrieve -m report
sfdx force:source:retrieve -m CustomSite,ExperienceBundle,Network,NavigationMenu
sfdx force:source:retrieve -m managedTopics,NetworkBranding
sfdx force:source:retrieve -m StandardValueSet
sfdx force:source:retrieve -m CustomObjectTranslation
sfdx force:source:retrieve -m profiles

0 人点赞