clean up errors

This commit is contained in:
Cherrie Chang 2024-10-30 13:50:22 -04:00
parent d02f62527b
commit 9d5215e554
2 changed files with 4 additions and 9 deletions

View File

@ -16,14 +16,13 @@ export default function generateCitation() {
const rawCff = fs.readFileSync("./CITATION.cff", "utf-8").toString();
const cffData = yaml.parse(rawCff);
if (cffData["preferred-citation"]) {
console.log("Found 'preferred-citation' in CITATION.cff");
preferredCitation = true;
} else {
console.log("No 'preferred-citation' found in CITATION.cff");
}
return yaml.stringify(rawCff);
} catch (error) {
console.log(`Error finding CITATION.cff: ${error.message}`);
console.log(
`No CITATION.cff file found: ${error.message}. If you would like to include a citation, please create a CITATION.cff file in the root of your repository.`
);
return null;
}
})();
@ -61,7 +60,7 @@ export default function generateCitation() {
});
return citationBibtex;
} catch (error) {
console.log(`Error converting CITATION.cff to bibtex string: ${error.message}`);
console.log(`Error converting CITATION.cff to BibTex string: ${error.message}`);
return null;
}
})();

View File

@ -45,10 +45,6 @@ const makeConfig = ({
/** @type{import("rollup-plugin-esbuild").Options} */
const esBuildPluginOptions = {
// define: {
// __APACITATION_: JSON.stringify(citationData.apa),
// __BIBTEXCITATION__: JSON.stringify(citationData.bibtex),
// },
loaders: { ".json": "json" },
};