diff --git a/.gitignore b/.gitignore index 36d62685..3546bd58 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +fonts + # Logs logs *.log diff --git a/index.js b/index.js index 00155756..1e23882f 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,7 @@ module.exports = function(options = {}) { const modulePath = findPkgDir(__dirname); let config = fs.readJsonSync('./specs.json'); let assets = fs.readJsonSync(modulePath + '/src/asset-map.json'); + let externalReferences; let references = []; let definitions = []; @@ -197,8 +198,7 @@ module.exports = function(options = {}) { return fs.readFile(spec.spec_directory + _path, 'utf8').catch(e => reject(e)) })).then(async docs => { const features = (({ source, logo }) => ({ source, logo }))(spec); - let externalReferences; - if (spec.external_specs) { + if (spec.external_specs && !externalReferences) { externalReferences = await fetchExternalSpecs(spec); } let doc = docs.join("\n");