mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
clean up errors
This commit is contained in:
parent
d02f62527b
commit
9d5215e554
@ -16,14 +16,13 @@ export default function generateCitation() {
|
|||||||
const rawCff = fs.readFileSync("./CITATION.cff", "utf-8").toString();
|
const rawCff = fs.readFileSync("./CITATION.cff", "utf-8").toString();
|
||||||
const cffData = yaml.parse(rawCff);
|
const cffData = yaml.parse(rawCff);
|
||||||
if (cffData["preferred-citation"]) {
|
if (cffData["preferred-citation"]) {
|
||||||
console.log("Found 'preferred-citation' in CITATION.cff");
|
|
||||||
preferredCitation = true;
|
preferredCitation = true;
|
||||||
} else {
|
|
||||||
console.log("No 'preferred-citation' found in CITATION.cff");
|
|
||||||
}
|
}
|
||||||
return yaml.stringify(rawCff);
|
return yaml.stringify(rawCff);
|
||||||
} catch (error) {
|
} 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;
|
return null;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
@ -61,7 +60,7 @@ export default function generateCitation() {
|
|||||||
});
|
});
|
||||||
return citationBibtex;
|
return citationBibtex;
|
||||||
} catch (error) {
|
} 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;
|
return null;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
@ -45,10 +45,6 @@ const makeConfig = ({
|
|||||||
|
|
||||||
/** @type{import("rollup-plugin-esbuild").Options} */
|
/** @type{import("rollup-plugin-esbuild").Options} */
|
||||||
const esBuildPluginOptions = {
|
const esBuildPluginOptions = {
|
||||||
// define: {
|
|
||||||
// __APACITATION_: JSON.stringify(citationData.apa),
|
|
||||||
// __BIBTEXCITATION__: JSON.stringify(citationData.bibtex),
|
|
||||||
// },
|
|
||||||
loaders: { ".json": "json" },
|
loaders: { ".json": "json" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user