Skip to content

Conversation

@ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Jun 6, 2025

Example: Change extension to .scss using CLI

copyfiles "input/**/*.css" "output/*.scss"

This will copy:

  • input/foo.cssoutput/foo.scss
  • input/bar/baz.cssoutput/bar/baz.scss

or via rename callback

Example: Change extension to .scss using a callback

import { copyfiles } from 'native-copyfiles';

copyfiles(['input/**/*.css', 'output'], {
  flat: true,
  rename: (src, dest) => dest.replace(/\.css$/, '.scss')
}, (err) => {
  // All files like input/foo.css → output/foo.scss
});

@codecov
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (02253ee) to head (5a8a44c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #19   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          233       273   +40     
  Branches        68        80   +12     
=========================================
+ Hits           233       273   +40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ghiscoding ghiscoding changed the title feat: rename multiple files using glob patterns feat: rename multiple files while copying using glob patterns Jun 6, 2025
@ghiscoding ghiscoding merged commit c7ed58d into main Jun 6, 2025
4 checks passed
@ghiscoding ghiscoding changed the title feat: rename multiple files while copying using glob patterns feat: rename multiple files while copying using wildcard * Jun 6, 2025
@ghiscoding ghiscoding deleted the feat/glob-file-renaming branch July 5, 2025 20:40
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