https://github.com/citation-js/plugin-template

Template for Citation.js plugins

https://github.com/citation-js/plugin-template

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.9%) to scientific vocabulary

Keywords from Contributors

archival projection interactive profiles generic sequences observability autograding hacking shellcodes
Last synced: 11 months ago · JSON representation

Repository

Template for Citation.js plugins

Basic Info
  • Host: GitHub
  • Owner: citation-js
  • License: mit
  • Language: JavaScript
  • Default Branch: main
  • Size: 33.2 KB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Created over 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

plugin-template

Template for Citation.js plugins

Usage

Initiating the template

```bash mkdir your-plugin cd your-plugin

npm init @citation-js/plugin

or 'npx @citation-js/create-plugin'

```

This triggers a few questions:

  • package name: The name of the package as you want to publish it on npm
  • version: The current version. I recommend 0.0.0, then you can run npm version major, minor or patch when the first version is ready
  • description: Something like "Citation.js plugin for ..."
  • entry point: You can leave this empty, unless you have some specific ideas. It gets filled in later with a more specific default
  • test command: You can leave this empty as well
  • git repository: If you are putting this in a Git repository, you can put the URL here
  • keywords: Comma-separated list of keywords, if you want to you can include citation-js and the format the plugin is for
  • author: Your name, optionally followed by <email> and/or (website)
  • license: Most current plugins are MIT-licensed, but that's your decision
  • Is this OK?: Yes, unless you made a mistake of course
  • What should the plugin scope name (csl, doi, bibtex) be? Up to you, but try to keep it simple, like pubmed for PubMed and PubMed Central Identifiers

This generates a file structure:

.
├── .gitignore
├── .travis.yml         # Configuration for my CI of choice, Travis CI
├── babel.config.js     # Configuration for the Babel build tool
├── package.json        # package manifest for npm/Node
├── README.md
├── src
│   ├── config.js       # Defines default config options
│   ├── index.js        # Registers the plugin
│   ├── input.js        # Defines input formats
│   └── output.js       # Defines output formats
└── test
    └── suite.js        # test suite

Now, run:

bash npm install

This installs the necessary development tools.

Editing source files

  • If your plugin only defines input or output formats, you can remove the other file and references to that file from index.js.
  • If you do not need configuration, you can remove the file and remove references to the file from index.js and input.js.
  • input.js contains an example format with an identifier that gets parsed into an API URL, the result of which
  • More documentation and links can be found in comments in the source files.
  • The code style is StandardJS. Linting can be done with npm run lint and simple style issues can be corrected with npm run lint -- --fix

Testing

  • An easy way to test while developing is with the following code: ```js const core = require('@citation-js/core') // Get Citation.js require('@babel/register') // Make sure you can use modern features require('./src/') // Load the plugin you are working on

// If you are using synchronous functions const data = core.Cite(input, options) // ...

// If you are using asynchronous functions core.Cite.async(input, options) .then(data => /* ... */) .catch(console.error) `` - To write proper tests, seetest/suite.js`, which includes comments

Owner

  • Name: Citation.js
  • Login: citation-js
  • Kind: organization
  • Email: citationjs@protonmail.com

GitHub Events

Total
  • Create event: 1
Last Year
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 21
  • Total Committers: 2
  • Avg Commits per committer: 10.5
  • Development Distribution Score (DDS): 0.048
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Lars Willighagen l****n@g****m 20
dependabot[bot] 4****] 1

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 1
  • Total pull requests: 4
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 7 months
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.5
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • larsgw (1)
Pull Request Authors
  • dependabot[bot] (4)
Top Labels
Issue Labels
Pull Request Labels
dependencies (4) javascript (1)

Dependencies

package-lock.json npm
  • balanced-match 1.0.2
  • brace-expansion 2.0.1
  • builtins 5.0.1
  • fs.realpath 1.0.0
  • function-bind 1.1.1
  • glob 8.0.3
  • has 1.0.3
  • hosted-git-info 5.0.0
  • inflight 1.0.6
  • inherits 2.0.4
  • init-package-json 3.0.2
  • is-core-module 2.9.0
  • json-parse-even-better-errors 2.3.1
  • lru-cache 7.10.1
  • lru-cache 6.0.0
  • minimatch 5.0.1
  • mute-stream 0.0.8
  • normalize-package-data 4.0.0
  • npm-normalize-package-bin 1.0.1
  • npm-package-arg 9.0.2
  • once 1.4.0
  • promzard 0.3.0
  • read 1.0.7
  • read-package-json 5.0.1
  • semver 7.3.7
  • spdx-correct 3.1.1
  • spdx-exceptions 2.3.0
  • spdx-expression-parse 3.0.1
  • spdx-license-ids 3.0.11
  • validate-npm-package-license 3.0.4
  • validate-npm-package-name 4.0.0
  • wrappy 1.0.2
  • yallist 4.0.0
package.json npm
  • init-package-json ^3.0.2