distribution and site management

This commit is contained in:
Clément GOUIN
2019-07-10 15:07:32 +02:00
parent 682e84914c
commit 2701ee39e5
14 changed files with 7287 additions and 30 deletions
+8 -20
View File
@@ -1,25 +1,13 @@
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();
let list = {};
try {
list = require('../svg_list.json');
}catch(err){
console.error('fa-diagrams: SVG list could not be loaded', err);
}
const self = {
list: list
};
module.exports = self;
module.exports = self; // Node
global['faDiagrams'] = self; // Browserify