How to use the wrench.copyDirSyncRecursive function in wrench

To help you get started, we’ve selected a few wrench examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imdone / imdone-core / test / repository-spec.js View on Github external
beforeEach(function() {
    wrench.mkdirSyncRecursive(tmpDir);
    wrench.copyDirSyncRecursive(repoSrc, tmpReposDir, {forceDelete: true});
    wrench.copyDirSyncRecursive(filesSrc, repoDir, {forceDelete: true});
    repo = fsStore(new Repository(repoDir));
    configDir = path.join(repo.getPath(), ".imdone");
    repo1 = fsStore(new Repository(repo1Dir));
    repo2 = fsStore(new Repository(repo2Dir));
    repo3 = fsStore(new Repository(repo3Dir))
  });
github fluuuid / codedoodl.es / utils / deployer.js View on Github external
function copyFiles(from, to) {

  wrench.copyDirSyncRecursive(from, to, { forceDelete: true });
  console.log('copied from '+from+' to '+to);

}
github jondubois / nombo / bin / cli.js View on Github external
var copyDirRecursive = function(src, dest) {
	try {
		wrench.copyDirSyncRecursive(src, dest);
		return true;
	} catch(e) {
		failedToCreateMessage();
	}
	return false;
}
github peerigon / alamid / bin / alamidCli.js View on Github external
function createStructure() {

    //we don't want it to exist
    appDirExists(false);

    //folders
    wrench.copyDirSyncRecursive(path.join(__dirname, "structure/app"), appDir);
    wrench.copyDirSyncRecursive(path.join(__dirname, "structure/bundle"), path.join(process.cwd, "./bundle"));

    //init-files
    fs.createReadStream(path.join(__dirname, "structure/init.server.js")).pipe(fs.createWriteStream(appDir + "/init.server.js"));
    fs.createReadStream(path.join(__dirname, "structure/init.client.js")).pipe(fs.createWriteStream(appDir + "/init.client.js"));
}

wrench

Recursive filesystem (and other) operations that Node *should* have.

MIT
Latest version published 9 years ago

Package Health Score

56 / 100
Full package analysis