mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
removed fs-extra dependancy
This commit is contained in:
@@ -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);
|
||||
} });
|
||||
|
||||
+3
-3
@@ -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)
|
||||
|
||||
@@ -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));
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user