Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds ability to ignore git dependencies #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hrudyna
Copy link

@hrudyna hrudyna commented Jun 16, 2021

No description provided.

Copy link
Owner

@mweststrate mweststrate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Would you mind addressing the comments I left?

@@ -108,13 +109,17 @@ async function libraryHasChanged(name, libDir, targetDir, hashStore) {

async function findFiles(libDir, targetDir) {
const ignore = ["**/*", "!node_modules", "!.git"]
const { argv: { ignoreGit } } = yargs
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you register the option in cli.js instead of inline in this function? Otherwise the option would be shown in the help etc.

// TODO: use resolved paths here
if (targetDir.indexOf(libDir) === 0) {
// The target dir is in the lib directory, make sure that path is excluded
ignore.push("!" + targetDir.substr(libDir.length + 1).split(path.sep)[0])
}
const files = await globby(ignore, {
gitignore: true,
gitignore: !ignoreGit,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I read this correctly, I'm confused by the name now, ignoreGit is now off by default, which turns the option to globby on. But if you pass the ignoreGit flag, the gitignore flag will not be applied. Could you either find a better name, or remove the negation and default to true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants