First of all, thanks for considering contributing. Contributions are very welcome. Below is some hopefully helpful information.
Support questions are fine too, as there isn't a thing set up for that yet. Also, it usually starts a conversation resulting in new bug reports and feature suggestions, which are always welcome. However, Stack Overflow may also be worth considering.
To install for development, it's probably best to clone this repo:
git clone https://github.com/larsgw/citation.js.git
Install dependencies:
npm install
Then you can run the scripts available in package.json
:
test
runs the Mocha suitetest:live
doesn't mock http(s) requeststest:update
updates the mocking data- To update mocking data for individual APIs
test:update:doi
andtest:update:wikidata
compile
runs Babel (necessary for the repo to work as a module)lint
runs the code linterlint:src
does it for the source fileslint:test
does it for the test suitelint:tools
does it for the various scriptslint:bin
does it for the CLI
- The following bundles can be created:
dist:regular-main
bundles the source filesdist:debug
does the same but with source mapsdist:regular-test
bundles the test suite- To minify, run:
dist:minify-main
minifies the source file bundledist:minify-test
minifies the test suite bundle
- Combine this like so:
dist:regular
creates all bundlesdist:minify
minifies all bundlesdist:main
bundles and minifies the source filesdist:test
bundles and minifies the test suite.dist
creates and minifies all bundles
- Generating other files is done like this:
generate:files
is an alias fordist
mentioned abovegenerate:docs
generates the JSDoc filesgenerate:disc
generates the bundle disc visualisationgenerate
generates everything mentioned above
You can run a given script with:
npm run SCRIPT_NAME
When filing an issue, make sure to answer these questions:
- What version of Citation.js are you using?
- What version of Node and what OS are you using?
- If you're not comfortable with sharing OS info, note that it probably only matters for CLI and dev issues anyway
- What did you do? (this includes input data, configuration, etc.)
- What did you expect to see?
- What actually happened?
Citation.js is becoming a more modular library to parse and output different bibliography formats, selecting formats according to your own needs.
When suggesting a new feature, make sure to answer these questions:
- What feature would you like to see?
- What are some expected use cases?
- How should it work?
PRs are welcome. Please do follow the conventions:
- Code style is "standard"
- Commit message is
[SCOPE(:SUBSCOPE)] Message
with an optional explanation and/orFixes/Closes #n
on a new line for issues. Examples:[input:wikidata] Add support for qualifiers
Closes #14
[output] Fix DOM HTML Element TypeError
Was referencing incorrect variables
Fixes #15