Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

copy-files-from-to

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-files-from-to - npm Package Compare versions

Comparing version 3.7.0 to 3.8.0

3

index.js
#!/usr/bin/env node
// To debug:
// $ node --inspect-brk ./index.js --config test/<test-name>/copy-files-from-to.json
var path = require('path'),

@@ -4,0 +7,0 @@ fs = require('fs');

@@ -254,3 +254,7 @@ var path = require('path'),

}()),
to: unixify(path.join(configFileSourceDirectory, to)),
to: (
(to.charAt(to.length - 1) === '/') ?
unixify(path.join(configFileSourceDirectory, to)) + '/' :
unixify(path.join(configFileSourceDirectory, to))
),
toFlat: toFlat,

@@ -383,2 +387,12 @@ removeSourceMappingURL: removeSourceMappingURL,

copyFiles = copyFiles.map((copyFile) => {
if (
copyFile.to.charAt(copyFile.to.length - 1) === '/' &&
!isGlob(copyFile.intendedFrom)
) {
copyFile.to = path.join(copyFile.to, path.basename(copyFile.from));
}
return copyFile;
});
var writeContents = function (copyFile, options, cb) {

@@ -385,0 +399,0 @@ var to = copyFile.to,

2

package.json
{
"name": "copy-files-from-to",
"version": "3.7.0",
"version": "3.8.0",
"description": "Copy files from one path to another, based on the instructions provided in a configuration file.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -138,2 +138,8 @@ # copy-files-from-to

// Copy the file at the mentioned path into the target directory
{
"from": "src/app/images/favicon.ico",
"to": "public/"
},
// Copy the files matching the "glob" pattern (matching files, along with the their folder structure go into the "to" directory)

@@ -140,0 +146,0 @@ {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc