Skip to content

.sgdignore and .sgdinclude could be fetched automatically if they exist in the root of an sfdx project #552

@AllanOricil

Description

@AllanOricil

Is your proposal related to a problem?

All the major CLIs we use look for predefined file names. For instance, .gitignore for git, webpack.config for webpack, .eslitconfig and .eslintignore for eslint, .prettierignore for prettier, pom.xml for maven, .npmignore for npm and a lot more. Therefore I think sgd could do the same for .sgdignore (-i) and .sgdinclude (-n).

steps to reproduce:

  1. create a brand new sfdx project and commit
  2. create a dummy lwc component and commit
  3. run mkdir output
  4. create a .sgdignore and add the following entry **/lwc/** in it
  5. run sfdx sgd:source:delta -f HEAD~
  6. verify the lwc is included in output/package/package.xml
  7. run sfdx sgd:source:delta -f HEAD~ -i .sgdignore`
  8. verify the lwc was excluded from output/package/package.xml
  9. confirm that sgd doesn't automatically look for a .sgdignore file in the project.

do the same steps for .sgdinclude to reach the same conclusion.

proposal

When -i is omitted, sgd must look for an .sgdignore file in the root of the project. When sgd can't find this file, it must not ignore anything.

When -n is omitted, sgd must look for an .sgdinclude file in the root of the project. When sgd can't find this file, it must not include anything.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions