New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

copy-and-watch

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-and-watch - npm Package Compare versions

Comparing version

to
0.0.6

12

index.js
/* IMPORTS */
const fs = require('fs-extra');
const fs = require('fs');
const path = require('path');

@@ -41,3 +41,3 @@ const chokidar = require('chokidar');

const to = findTarget(from);
fs.copySync(from, to);
fs.writeFileSync(to, fs.readFileSync(from));
console.log('[COPY]'.yellow, from, 'to'.yellow, to);

@@ -47,3 +47,3 @@ };

const to = findTarget(from);
fs.removeSync(to);
fs.unlinkSync(to);
console.log('[DELETE]'.yellow, to);

@@ -54,7 +54,9 @@ };

if (options.clean) {
fs.removeSync(target);
fs.rmdirSync(target)
}
// initial copy
fs.ensureDirSync(target);
if (!fs.existsSync(target)) {
fs.mkdirSync(target);
}
sources.forEach(s => glob.sync(s).forEach(copy));

@@ -61,0 +63,0 @@

{
"name": "copy-and-watch",
"version": "0.0.5",
"version": "0.0.6",
"description": "Synchronize files or folders locally, with a watch option",

@@ -30,3 +30,2 @@ "main": "index.js",

"colors": "^1.1.2",
"fs-extra": "^2.0.0",
"glob": "^7.1.1",

@@ -33,0 +32,0 @@ "glob-parent": "^3.1.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet