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

[bug] quoted glob star does not match for multiple file extenstion #118

Open
Yimiprod opened this issue Oct 14, 2022 · 0 comments
Open

[bug] quoted glob star does not match for multiple file extenstion #118

Yimiprod opened this issue Oct 14, 2022 · 0 comments

Comments

@Yimiprod
Copy link

Yimiprod commented Oct 14, 2022

Given this files:

src
  schemas
    Product.graphql
    User.gql

When running:

npx copyfiles src/schemas/**/*.(gql|graphql) dist

We correctly get:

dist
  src
    schemas
      Product.graphql
      User.gql

But when running:

npx copyfiles "src/schemas/**/*.(gql|graphql)" dist

Nothing is copied.

It is a problem since if we use copyfile in a script packages like this:

{
  "scripts": {
    "copy: "copyfiles \"src/schemas/**/*.(gql|graphql)\" dist"
  }
}

it will not work as expected and we can't unquote it because npm scripts doesn't handle parenthesis ( and pipe | correctly.

Only way to have a "correct" behavior is by doing this:

{
  "scripts": {
    "copy: "copyfiles src/schemas/**/*.gql  src/schemas/**/*.graphql dist"
  }
}

Which is not easy to maintain and read.

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

1 participant