question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support minimatch in copyFiles

See original GitHub issue

I’m submitting a feature request

Current behavior: I have to list every single file in copyFiles, e.g.

  "copyFiles": {
      "node_modules/mdi/css/materialdesignicons.min.css": "static_resources/vendor/mdi/css",
      "node_modules/mdi/fonts/materialdesignicons-webfont.eot": "static_resources/vendor/mdi/fonts",
      "node_modules/mdi/fonts/materialdesignicons-webfont.svg": "static_resources/vendor/mdi/fonts",
      "node_modules/mdi/fonts/materialdesignicons-webfont.ttf": "static_resources/vendor/mdi/fonts",
      "node_modules/mdi/fonts/materialdesignicons-webfont.woff": "static_resources/vendor/mdi/fonts",
      "node_modules/mdi/fonts/materialdesignicons-webfont.woff2": "static_resources/vendor/mdi/fonts"
  }

Expected/desired behavior: I can specify a pattern matching files I want to copy, e.g.

  "copyFiles": {
      "node_modules/mdi/css/materialdesignicons.min.css": "static_resources/vendor/mdi/css",
      "node_modules/mdi/fonts/*": "static_resources/vendor/mdi/fonts"
  }

What is the motivation / use case for changing the behavior? Most web font packages contain a few file types (eot, ttf, woff, woff2, svg). On top of that, many web font packages contain variant (Bold, Italic, Light, Medium, Thick, Regular, etc.) I currently have to import 25 files manually for NotoSans, for example: https://github.com/GreatWizard/notosans-fontface/tree/master/fonts

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chabou-sancommented, Mar 19, 2017

The problem is not due to Windows, since I’m also having the issue for Aurelia-cli 0.26.1 on macOS. I tried on bootstrap library first since @fabioluz said it worked for him (and so is @Vheissu), but I got the same error than @khuongduybui. Using its proposed solution worked for me too.

0reactions
khuongduybuicommented, Mar 17, 2017

I replaced that line with const key = files.find(f => minimatch(filePath, f)); and wildcards started to work like a charm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CopyFiles@1 - Copy Files v1 task
Copy files from source folder to target folder using minimatch patterns (The ... This string supports multiple lines of match patterns.
Read more >
Issues · calvinmetcalf/copyfiles
Issues list ; Copy from multiple sources to multiple sources using pattern. #121 opened 3 weeks ago ; Bump minimatch. #120 opened last...
Read more >
TFS copy and deploy: exclude files using minimatch
Note: If it's still not working on copy files step, you should pay attention to the architecture of file when using minimatch.
Read more >
copyfiles | Yarn - Package Manager
copyfiles Build Status. copy files easily. Install. npm install copyfiles -g. Command Line. Usage: copyfiles [options] inFile [more files .
Read more >
Copy Files task does not copy empty directories
I tried some different minimatch patterns to see if I could get it to work, ... support copying empty directories, I assumed that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found