Skip to content

Commit a753282

Browse files
committed
fix(bin): replace copySync that was removed from fs-extra
fs.cpSync added in node 16 is still experimental but working fine. release-npm
1 parent ae505ef commit a753282

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env node
22
import { join, dirname } from 'path'
3-
import { existsSync, unlinkSync, rmdirSync, lstatSync, mkdirSync } from 'fs'
4-
import { copySync } from 'fs-extra'
3+
import { existsSync, unlinkSync, rmdirSync, lstatSync, mkdirSync, cpSync } from 'fs'
54
import { execSync } from 'child_process'
65
import names from './names.js'
76
import customize from './customize.js'
@@ -35,7 +34,7 @@ const npmPackagePath = dirname(new URL(import.meta.url).pathname)
3534
const templateDirectory = join(npmPackagePath, 'template')
3635
const destinationDirectory = join(process.cwd(), name.regular)
3736

38-
copySync(templateDirectory, destinationDirectory)
37+
cpSync(templateDirectory, destinationDirectory, { recursive: true })
3938

4039
customize(name, destinationDirectory)
4140

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"source": true
1010
},
1111
"dependencies": {
12-
"change-case": "4.1.2",
13-
"fs-extra": "10.1.0"
12+
"change-case": "4.1.2"
1413
},
1514
"type": "module",
1615
"bin": "index.js",
@@ -37,5 +36,8 @@
3736
"ignorePackages"
3837
]
3938
}
39+
},
40+
"engines": {
41+
"node": ">= 16.7.0"
4042
}
4143
}

0 commit comments

Comments
 (0)