Réussi! - échec : 0, réussite : 2, ignorée(s) : 0, total : 2, durée : 444 ms

This commit is contained in:
Paul Schneider
2021-05-09 14:56:32 +01:00
parent 6a59f776d5
commit ffb7cad00a
15 changed files with 181 additions and 33 deletions

View File

@ -0,0 +1,17 @@
var path = require("path");
module.exports = function(filename, projectPath, folderPath) {
var namespace = "Unknown";
if (projectPath) {
namespace = path.basename(projectPath, path.extname(projectPath));
if (folderPath) {
namespace += "." + folderPath.replace(path.dirname(projectPath), "").substring(1).replace(/[\\\/]/g, ".");
}
namespace = namespace.replace(/[\\\-]/g, "_");
}
return {
namespace: namespace,
name: path.basename(filename, path.extname(filename))
}
};