I'm using a sample project I generated in VS Code, and added a couple of lightning components and lightning web components.

In testing some scripting, I am trying to accomplish a selective sfdx lightning component deploy like

sfdx force:source:deploy -p force-app/default/aura/mycomponent1/componentname.cmp

But! When I attempt this, all of the other artifacts get deployed as well.

The documentation says you can specify a path to a single file, but it doesn't appear to work that way. When I do a retrieve, all of the components files are pulled down :(

Output of sfdx -v:

sfdx-cli/7.5.0-e6ca93eee8 win32-x64 node-v10.15.3

Just a case of doing-it-wrong?

  • 2
    I think this is by design. All Lightning Aura Components get deployed together, whereby other types of metadata can be deployed individually – Brian Miller Jul 11 '19 at 17:55
  • Brian is exactly right (and could write the comment as an answer). force:source:deploy uses the Metadata API, and the MDAPI AuraDefinitionBundle type includes the different elements as base64Binary blobs, rather than as child XML types. – Thomas Taylor Jul 11 '19 at 18:37
  • Ah very good to know, thank you both for the clarification – trebleCode Jul 11 '19 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.