svg list build

This commit is contained in:
Clément GOUIN
2019-07-10 11:03:26 +02:00
parent 998fe832ea
commit 682e84914c
7 changed files with 1010 additions and 226 deletions
+25
View File
@@ -0,0 +1,25 @@
const path = require('path');
const loadList = () => {
const paths = [
path.join(__dirname, '..', 'build', 'svg_list.json'),
path.join(__dirname, '..', 'svg_list.json'),
];
for (let p = 0; p < paths.length; p++) {
try {
return require(paths[p]);
} catch (err) {
//ignored
}
}
console.error('fa-diagrams: SVG list was not found at the following paths:\n\t* ' + paths.join('\n\t* '));
return {};
};
const list = loadList();
const self = {
list: list
};
module.exports = self;