diff --git a/Jake/applicationtask.js b/Jake/applicationtask.js index 4ff965937..45bf0153c 100644 --- a/Jake/applicationtask.js +++ b/Jake/applicationtask.js @@ -25,7 +25,7 @@ var /* FILE = require("file"), */ Jake = require("objj-jake"), BundleTask = (require("./bundletask")).BundleTask; -var fs = require("fs-extra"); +var fs = require("fs"); var path = require("path"); function ApplicationTask(aName) @@ -99,7 +99,7 @@ ApplicationTask.prototype.defineFrameworksTask = function() tempPath = path.join(process.cwd(), ".__capp_Frameworks_Source__"); if (hasSource) fs.moveSync(sourcePath, tempPath); - fs.copySync(thisTask._frameworksPath, newFrameworks, { recursive: true }); + copyRecursiveSync(thisTask._frameworksPath, newFrameworks); if (hasSource) fs.moveSync(tempPath, sourcePath); } }); diff --git a/Jake/bundletask.js b/Jake/bundletask.js index 86e67d0d1..ad81c0e31 100644 --- a/Jake/bundletask.js +++ b/Jake/bundletask.js @@ -25,7 +25,7 @@ const child_process = require("child_process"); const path = require("path"); // NPM modules -const fs = require("fs-extra"); +const fs = require("fs"); const ObjectiveJ = require("objj-runtime"); const term = require("objj-runtime").term; @@ -437,9 +437,9 @@ BundleTask.prototype.defineResourceTask = function(aResourcePath, aDestinationPa catch(anException) { } if (fs.lstatSync(aResourcePath).isDirectory()) - fs.copySync(aResourcePath, aDestinationPath, { recursive: true }); + copyRecursiveSync(aResourcePath, aDestinationPath); else - fs.copySync(aResourcePath, aDestinationPath); + fs.copyFileSync(aResourcePath, aDestinationPath); }); this.enhance([aDestinationPath]); } if ((extension === ".xib" || extension === ".nib") && !this._preventsNib2Cib) diff --git a/Tools/capp/Generate.j b/Tools/capp/Generate.j index dabcd79d5..7d729ef46 100644 --- a/Tools/capp/Generate.j +++ b/Tools/capp/Generate.j @@ -32,7 +32,7 @@ var OBJJ = require("objj-runtime"), // FIXME: lots of chaining using narwhals path wrapper, this file might still be broken -var fs = require("fs-extra"); +var fs = require("fs"); var node_path = require("path"); var child_process = require("child_process"); var jake = require("objj-jake"); @@ -177,7 +177,7 @@ function gen(/*va_args*/) else if (!fs.existsSync(destinationProject)) { // FIXME??? - fs.copySync(sourceTemplate, destinationProject, { recursive: true }); + copyRecursiveSync(sourceTemplate, destinationProject); var files = (new jake.FileList(node_path.join(destinationProject, "**", "*"))).toArray(), count = files.length, @@ -347,7 +347,7 @@ function installFramework(source, dest, force, symlink) if (symlink) fs.symlinkSync(source, dest); else - fs.copySync(source, dest, { recursive: true }); + copyRecursiveSync(source, dest); } else warn("Cannot find: " + logPath(source)); @@ -408,7 +408,7 @@ function installTheme(source, dest, force, symlink) if (symlink) fs.symlinkSync(source, dest); else - fs.copySync(source, dest, { recursive: true }); + copyRecursiveSync(source, dest); } else warn("Cannot find: " + logPath(source)); diff --git a/common.jake b/common.jake index a97a6976e..56a0f8ae4 100644 --- a/common.jake +++ b/common.jake @@ -217,7 +217,7 @@ global.rm_rf = function(/*String*/ aFilename) // from stackoverflow -function copyRecursiveSync (src, dest) { +global.copyRecursiveSync = function (src, dest) { var exists = fs.existsSync(src); var stats = exists && fs.statSync(src); var isDirectory = exists && stats.isDirectory();