Skip to content

Commit 2485b83

Browse files
committed
2 parents b227e63 + 41deaed commit 2485b83

File tree

5 files changed

+462
-440
lines changed

5 files changed

+462
-440
lines changed

.github/semantic-pull-request.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Semantic Pull Request
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
runs-on: ubuntu-latest
13+
name: Semantic Pull Request
14+
permissions:
15+
pull-requests: read
16+
steps:
17+
- name: Validate PR title
18+
uses: amannn/action-semantic-pull-request@v6
19+
with:
20+
requireScope: false
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
44

5+
## [1.3.5](https://github.com/ghiscoding/native-copyfiles/compare/v1.3.4...v1.3.5) (2025-07-14)
6+
7+
### Bug Fixes
8+
9+
* `.git` and `node_modules` should be excluded by default ([#34](https://github.com/ghiscoding/native-copyfiles/issues/34)) ([7f3a4c9](https://github.com/ghiscoding/native-copyfiles/commit/7f3a4c989391eab1341406712ebb8e15f50895c2))
10+
511
## [1.3.4](https://github.com/ghiscoding/native-copyfiles/compare/v1.3.3...v1.3.4) (2025-07-09)
612

713
### Bug Fixes

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)
33
[![Vitest](https://img.shields.io/badge/tested%20with-vitest-fcc72b.svg?logo=vitest)](https://vitest.dev/)
44
[![codecov](https://codecov.io/gh/ghiscoding/native-copyfiles/branch/main/graph/badge.svg)](https://codecov.io/gh/ghiscoding/native-copyfiles)
5+
<a href="https://nodejs.org/en/about/previous-releases"><img src="https://img.shields.io/node/v/native-copyfiles.svg" alt="Node" /></a>
6+
57
[![npm](https://img.shields.io/npm/v/native-copyfiles.svg)](https://www.npmjs.com/package/native-copyfiles)
68
[![npm](https://img.shields.io/npm/dy/native-copyfiles)](https://www.npmjs.com/package/native-copyfiles)
7-
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/native-copyfiles?color=success&label=gzip)](https://bundlephobia.com/result?p=native-copyfiles)
8-
<a href="https://nodejs.org/en/about/previous-releases"><img src="https://img.shields.io/node/v/native-copyfiles.svg" alt="Node" /></a>
9+
[![npm bundle size](https://deno.bundlejs.com/badge?q=native-copyfiles)](https://bundlejs.com/?q=native-copyfiles)
910

1011
## native-copyfiles
1112

1213
Copy files easily via JavaScript or the CLI, it uses [tinyglobby](https://www.npmjs.com/package/tinyglobby) internally for glob patterns and [cli-nano](https://www.npmjs.com/package/cli-nano) for the CLI.
1314

14-
The library is very similar to the [copyfiles](https://www.npmjs.com/package/copyfiles) package, at least from the outside; however its internal is very different. It uses more native NodeJS code and a lot fewer dependencies (3 instead of 7), which makes this package a lot smaller compared to the original `copyfiles` project (1/3 of its size). The options are nearly the same (except for `--soft`, which is not implemented), new options were also added in this project here (mainly the rename feature, see below).
15+
The library is very similar to the [copyfiles](https://www.npmjs.com/package/copyfiles) package, at least from the outside; however its internal is quite different. It uses more native NodeJS code and a lot less dependencies (just 3 instead of 7), which makes this package a lot smaller compared to the original `copyfiles` project (1/4 of its size). The options are nearly the same (except for `--soft`, which is not implemented), there's also some new options that were added in this project (mainly the rename and dry-run features, see below).
1516

16-
> Note: there is 1 noticeable difference with `copyfiles`, any options must be provided as a suffix after the source/target directories command (the original `copyfiles` project has them as prefix).<br>
17+
> Note: there is 1 noticeable difference with `copyfiles`, all CLI options must be provided as a suffix after the source/target directories command (the original `copyfiles` project has them as prefix).<br>
1718
> This mean calling: `copyfiles source target [options]` instead of `copyfiles [options] source target`
1819
1920
### Install
@@ -46,7 +47,7 @@ Positionals:
4647
```
4748

4849
> [!NOTE]
49-
> Options **must** be provided after the command directories as suffix (the original project has them as prefix)
50+
> Options **must** be provided after the command directories as suffix (the original project references them as prefix)
5051
5152
copy some files, give it a bunch of arguments, (which can include globs), the last one
5253
is the out directory (which it will create if necessary). Note: on Windows globs must be **double quoted**, everybody else can quote however they please.
@@ -98,17 +99,17 @@ does.
9899

99100
You could quote globstars as a part of input:
100101
```bash
101-
copyfiles some.json "./some_folder/*.json" ./dist/ && echo 'JSON files copied.'
102+
copyfiles some.json "./some_folder/*.json" "./dist/" && echo 'JSON files copied.'
102103
```
103104

104105
You can use the `-e` option to exclude some files from the pattern, so to exclude all files ending in `".test.js"` you could do
105106

106107
```bash
107-
copyfiles "**/*.test.js" -f ./foo/**/*.js out -e
108+
copyfiles "**/*.test.js" -f "./foo/**/*.js" out -e
108109
```
109110

110111
> [!NOTE]
111-
> By default the `.git/` and `node_modules/` directories will be excluded.
112+
> By default the `.git/` and `node_modules/` directories will be excluded when using globs.
112113
113114
Other options include
114115

@@ -206,14 +207,14 @@ and finally the third and last argument is a callback function which is executed
206207

207208
```js
208209
{
209-
verbose: bool, // print more information to console
210-
up: number, // slice a path off the bottom of the paths
211-
exclude: string, // exclude pattern
212-
all: bool, // include dot files
213-
dryRun: bool, // show what would be copied, without actually copying anything
214-
follow: bool, // follow symlinked directories when expanding ** patterns
215-
error: bool // raise errors if no files copied
216-
stat: bool // show statistics after execution (time + file count)
210+
verbose: boolean; // print more information to console
211+
up: number; // slice a path off the bottom of the paths
212+
exclude: string; // exclude pattern
213+
all: boolean; // include dot files
214+
dryRun: boolean; // show what would be copied, without actually copying anything
215+
follow: boolean; // follow symlinked directories when expanding ** patterns
216+
error: boolean; // raise errors if no files copied
217+
stat: boolean; // show statistics after execution (time + file count)
217218
rename: (src, dest) => string; // callback to transform the destination filename(s)
218219
}
219220
```

0 commit comments

Comments
 (0)