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

Multimatch ignore file not supported #257

Open
fletort opened this issue Sep 25, 2023 · 1 comment
Open

Multimatch ignore file not supported #257

fletort opened this issue Sep 25, 2023 · 1 comment

Comments

@fletort
Copy link

fletort commented Sep 25, 2023

I use a ignore file that is evaluated by multimatch (https://github.com/google/clasp#ignore-file-claspignore)

So with a such exemple:

**/**
!src/**
!ut/**
!appsscript.json

should select all file in src and ut directory and appsscript.sjon file.

This is not the case with globby.
With this code:

const paths = await globby(['**/**'], {ignoreFiles: '.claspignore'});
console.log(paths);

The result is:

> node .\script.mjs
[ 'appsscript.json' ]

The file from src and ut directories are not "selected".

What i am missing ?

@arsnl
Copy link

arsnl commented Dec 18, 2023

The documentation mention that the value of the ignoreFiles must be Glob patterns to look for ignore files, which are then used to ignore globbed files..

In you case, something like that should work.

- const paths = await globby(['**/**'], {ignoreFiles: '.claspignore'});
+ const paths = await globby(['**/**'], {ignoreFiles: '**/.claspignore'});
console.log(paths); 

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

No branches or pull requests

2 participants