Merge branch 'dev' into pr_2165

This commit is contained in:
Nick O'Leary
2019-07-10 09:30:48 +01:00
282 changed files with 4009 additions and 1538 deletions

View File

@@ -51,7 +51,6 @@ function getFlowsFromPath(path) {
}
i++;
})
resolve(result);
})
});
@@ -61,6 +60,7 @@ function getFlowsFromPath(path) {
function addNodeExamplesDir(module,path) {
exampleRoots[module] = path;
return getFlowsFromPath(path).then(function(result) {
if (JSON.stringify(result).indexOf('{"f":') === -1) { return; }
exampleFlows = exampleFlows||{};
exampleFlows[module] = result;
});

View File

@@ -372,18 +372,27 @@ function getModuleFiles(module) {
return nodeList;
}
// If this finds an svg and a png with the same name, it will only list the svg
function scanIconDir(dir) {
var iconList = [];
var svgs = {};
try {
var files = fs.readdirSync(dir);
files.forEach(function(file) {
var stats = fs.statSync(path.join(dir, file));
if (stats.isFile() && iconFileExtensions.indexOf(path.extname(file)) !== -1) {
var ext = path.extname(file).toLowerCase();
if (stats.isFile() && iconFileExtensions.indexOf(ext) !== -1) {
iconList.push(file);
if (ext === ".svg") {
svgs[file.substring(0,file.length-4)] = true;
}
}
});
} catch(err) {
}
iconList = iconList.filter(f => {
return /.svg$/i.test(f) || !svgs[f.substring(0,f.length-4)]
})
return iconList;
}

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/registry",
"version": "0.21.0-alpha.0",
"version": "1.0.0-beta.2",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,9 +16,9 @@
}
],
"dependencies": {
"@node-red/util": "0.21.0-alpha.0",
"semver": "6.0.0",
"uglify-js": "3.5.9",
"@node-red/util": "1.0.0-beta.2",
"semver": "6.2.0",
"uglify-js": "3.6.0",
"when": "3.7.8"
}
}