removed glob dependancy

This commit is contained in:
Alfred Wärnsäter
2021-08-06 10:36:04 +02:00
parent 1c2b383838
commit 730b2dd874
4 changed files with 8 additions and 16 deletions
+2 -3
View File
@@ -2,7 +2,6 @@
require("../../../common.jake");
const path = require("path");
const glob = require("glob"); // FIXME: probably unnecessary to use an external library for this, maybe built into FileList?
var framework = require("../../../Jake/frameworktask.js").framework;
var BundleTask = require("../../../Jake/bundletask.js").BundleTask;
@@ -17,8 +16,8 @@ blendKitTask = framework ("BlendKit", function(blendKitTask)
blendKitTask.setAuthor("280 North, Inc.");
blendKitTask.setEmail("feedback @nospam@ 280north.com");
blendKitTask.setSummary("BlendKit classes for Cappuccino");
blendKitTask.setSources(glob.sync("*.j"));
blendKitTask.setResources(glob.sync("Resources/*"));
blendKitTask.setSources(new FileList("*.j"));
blendKitTask.setResources(new FileList("Resources/*"));
blendKitTask.setLicense(BundleTask.License.LGPL_v2_1);
blendKitTask.setFlattensSources(true); // FIXME: how do we non flatten?
+2 -3
View File
@@ -26,7 +26,6 @@ const path = require("path");
// NPM modules
const fs = require("fs-extra");
const glob = require("glob");
const ObjectiveJ = require("objj-runtime");
const term = require("objj-runtime").term;
@@ -493,11 +492,11 @@ BundleTask.prototype.defineResourceTasks = function()
{
if (fs.lstatSync(aResourcePath).isDirectory())
{
resources = resources.concat(aResourcePath, glob.sync(aResourcePath + "/**"));
resources = resources.concat(aResourcePath, (new FileList(aResourcePath + "/**")).toArray());
} else
resources.push(aResourcePath);
});
// TODO: too lazy to look this up, assuming it returns the array without duplicates
// TODO: assuming it returns the array without duplicates
// resources = UTIL.unique(resources);
resources = [... new Set(resources)];
if (resources.length <= 0)
+2 -4
View File
@@ -35,9 +35,7 @@ var OBJJ = require("objj-runtime"),
var fs = require("fs-extra");
var node_path = require("path");
var child_process = require("child_process");
var glob = require("glob");
var jake = require("objj-jake");
// FIXME: removing command line options for now
/* parser.usage("DESTINATION_DIRECTORY");
@@ -181,7 +179,7 @@ function gen(/*va_args*/)
// FIXME???
fs.copySync(sourceTemplate, destinationProject, { recursive: true });
var files = glob.sync(node_path.join(destinationProject, "**", "*")),
var files = (new jake.FileList(node_path.join(destinationProject, "**", "*"))).toArray(),
count = files.length,
name = node_path.basename(destinationProject),
orgIdentifier = [configuration valueForKey:@"organization.identifier"] || "";
+2 -6
View File
@@ -1,10 +1,6 @@
require("../../common.jake");
// var FILE = require("file");
const path = require("path");
const glob = require("glob");
var app = require("../../Jake/applicationtask.js").app;
var BundleTask = require("../../Jake/bundletask.js").BundleTask;
@@ -21,8 +17,8 @@ app ("nib2cib", function(nib2cibTask)
nib2cibTask.setEmail("feedback @nospam@ 280north.com");
nib2cibTask.setSummary("nib2cib converts Cocoa nib and xibs to Cappuccino cibs");
nib2cibTask.setSources(glob.sync("**/*.j"));
nib2cibTask.setResources(glob.sync("Resources/*"));
nib2cibTask.setSources(new FileList("**/*.j"));
nib2cibTask.setResources(new FileList("Resources/*"));
nib2cibTask.setEnvironments(require("../../Jake/environment.js").CommonJS);
nib2cibTask.setFlattensSources(true);