mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-19 17:03:29 +00:00
removed fs-extra dependancy
This commit is contained in:
@@ -25,7 +25,7 @@ var /* FILE = require("file"), */
|
|||||||
Jake = require("objj-jake"),
|
Jake = require("objj-jake"),
|
||||||
BundleTask = (require("./bundletask")).BundleTask;
|
BundleTask = (require("./bundletask")).BundleTask;
|
||||||
|
|
||||||
var fs = require("fs-extra");
|
var fs = require("fs");
|
||||||
var path = require("path");
|
var path = require("path");
|
||||||
|
|
||||||
function ApplicationTask(aName)
|
function ApplicationTask(aName)
|
||||||
@@ -99,7 +99,7 @@ ApplicationTask.prototype.defineFrameworksTask = function()
|
|||||||
tempPath = path.join(process.cwd(), ".__capp_Frameworks_Source__");
|
tempPath = path.join(process.cwd(), ".__capp_Frameworks_Source__");
|
||||||
if (hasSource)
|
if (hasSource)
|
||||||
fs.moveSync(sourcePath, tempPath);
|
fs.moveSync(sourcePath, tempPath);
|
||||||
fs.copySync(thisTask._frameworksPath, newFrameworks, { recursive: true });
|
copyRecursiveSync(thisTask._frameworksPath, newFrameworks);
|
||||||
if (hasSource)
|
if (hasSource)
|
||||||
fs.moveSync(tempPath, sourcePath);
|
fs.moveSync(tempPath, sourcePath);
|
||||||
} });
|
} });
|
||||||
|
|||||||
+3
-3
@@ -25,7 +25,7 @@ const child_process = require("child_process");
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
// NPM modules
|
// NPM modules
|
||||||
const fs = require("fs-extra");
|
const fs = require("fs");
|
||||||
const ObjectiveJ = require("objj-runtime");
|
const ObjectiveJ = require("objj-runtime");
|
||||||
const term = require("objj-runtime").term;
|
const term = require("objj-runtime").term;
|
||||||
|
|
||||||
@@ -437,9 +437,9 @@ BundleTask.prototype.defineResourceTask = function(aResourcePath, aDestinationPa
|
|||||||
catch(anException) {
|
catch(anException) {
|
||||||
}
|
}
|
||||||
if (fs.lstatSync(aResourcePath).isDirectory())
|
if (fs.lstatSync(aResourcePath).isDirectory())
|
||||||
fs.copySync(aResourcePath, aDestinationPath, { recursive: true });
|
copyRecursiveSync(aResourcePath, aDestinationPath);
|
||||||
else
|
else
|
||||||
fs.copySync(aResourcePath, aDestinationPath);
|
fs.copyFileSync(aResourcePath, aDestinationPath);
|
||||||
});
|
});
|
||||||
this.enhance([aDestinationPath]);
|
this.enhance([aDestinationPath]);
|
||||||
} if ((extension === ".xib" || extension === ".nib") && !this._preventsNib2Cib)
|
} 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
|
// 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 node_path = require("path");
|
||||||
var child_process = require("child_process");
|
var child_process = require("child_process");
|
||||||
var jake = require("objj-jake");
|
var jake = require("objj-jake");
|
||||||
@@ -177,7 +177,7 @@ function gen(/*va_args*/)
|
|||||||
else if (!fs.existsSync(destinationProject))
|
else if (!fs.existsSync(destinationProject))
|
||||||
{
|
{
|
||||||
// FIXME???
|
// FIXME???
|
||||||
fs.copySync(sourceTemplate, destinationProject, { recursive: true });
|
copyRecursiveSync(sourceTemplate, destinationProject);
|
||||||
|
|
||||||
var files = (new jake.FileList(node_path.join(destinationProject, "**", "*"))).toArray(),
|
var files = (new jake.FileList(node_path.join(destinationProject, "**", "*"))).toArray(),
|
||||||
count = files.length,
|
count = files.length,
|
||||||
@@ -347,7 +347,7 @@ function installFramework(source, dest, force, symlink)
|
|||||||
if (symlink)
|
if (symlink)
|
||||||
fs.symlinkSync(source, dest);
|
fs.symlinkSync(source, dest);
|
||||||
else
|
else
|
||||||
fs.copySync(source, dest, { recursive: true });
|
copyRecursiveSync(source, dest);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
warn("Cannot find: " + logPath(source));
|
warn("Cannot find: " + logPath(source));
|
||||||
@@ -408,7 +408,7 @@ function installTheme(source, dest, force, symlink)
|
|||||||
if (symlink)
|
if (symlink)
|
||||||
fs.symlinkSync(source, dest);
|
fs.symlinkSync(source, dest);
|
||||||
else
|
else
|
||||||
fs.copySync(source, dest, { recursive: true });
|
copyRecursiveSync(source, dest);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
warn("Cannot find: " + logPath(source));
|
warn("Cannot find: " + logPath(source));
|
||||||
|
|||||||
+1
-1
@@ -217,7 +217,7 @@ global.rm_rf = function(/*String*/ aFilename)
|
|||||||
|
|
||||||
|
|
||||||
// from stackoverflow
|
// from stackoverflow
|
||||||
function copyRecursiveSync (src, dest) {
|
global.copyRecursiveSync = function (src, dest) {
|
||||||
var exists = fs.existsSync(src);
|
var exists = fs.existsSync(src);
|
||||||
var stats = exists && fs.statSync(src);
|
var stats = exists && fs.statSync(src);
|
||||||
var isDirectory = exists && stats.isDirectory();
|
var isDirectory = exists && stats.isDirectory();
|
||||||
|
|||||||
Reference in New Issue
Block a user