Sélecteur pour le thème d'icone

This commit is contained in:
2015-08-31 23:08:56 +02:00
parent 5cd3fafb5e
commit 1c0a4e9f13
8 changed files with 97 additions and 34 deletions

View File

@ -79,6 +79,7 @@ exports.findIcon = function(iconName, themeName, size, themeIgnore) {
themeIgnore = themeIgnore || [];
if(themeIgnore.indexOf(themeIgnore) !== -1) {
debug('Theme %s already processed, ignoring...', themeName);
return Promise.resolve(null);
}
themeIgnore.push(themeName);

View File

@ -52,28 +52,12 @@ exports.runApp = function(execPath) {
});
};
var _globCache = {
statCache: {},
cache: {},
realpathCache: {},
symlinks: {}
};
exports.findFiles = function(pattern, opts) {
return new Promise(function(resolve, reject) {
opts = opts || {};
opts.cache = _globCache.cache;
opts.statCache = _globCache.statCache;
opts.realpathCache = _globCache.realpathCache;
opts.symlinks = _globCache.symlinks;
glob(pattern, opts, function(err, files) {
if(err) return reject(err);
return resolve(files);
});
});
};