@vanillaes/esmtk 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cp.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanillaes/esmtk",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "ES Module Toolkit",
5
5
  "keywords": [
6
6
  "esm",
package/src/cp.js CHANGED
@@ -41,8 +41,8 @@ export async function copyAsync (source, target, force = false) {
41
41
 
42
42
  // append source file name to target directory
43
43
  const sourceFile = basename(source)
44
- target = target.endsWith('/') ? target.slice(0, -1) : target
45
- target = `${target}/${sourceFile}`
44
+ target = target.endsWith(sep) ? target.slice(0, -1) : target
45
+ target = `${target}${sep}${sourceFile}`
46
46
  }
47
47
 
48
48
  try {
@@ -72,9 +72,9 @@ export async function copyMultipleAsync (sources, target, force = false) {
72
72
  }
73
73
 
74
74
  try {
75
- target = target.endsWith('/') ? target.slice(0, -1) : target
75
+ target = target.endsWith(sep) ? target.slice(0, -1) : target
76
76
  for (const source of sources) {
77
- await cp(source, `${target}/${basename(source)}`, { force: true })
77
+ await cp(source, `${target}${sep}${basename(source)}`, { force: true })
78
78
  }
79
79
  } catch (err) {
80
80
  console.error(`cp": error ${err.message}`)