docmap-ts 0.0.36
Install from the command line:
Learn more about npm packages
$ npm install @elifesciences/docmap-ts@0.0.36
Install via package.json:
"@elifesciences/docmap-ts": "0.0.36"
About this version
This repository holds the work of defining and understanding docmaps as used in eLife's Enhanced preprints platform.
Primarily the value is as a nodejs library you can import. This exports types, functions to generate different aspects of a docmap, and a parser intended to understand the current state of a document described in a docmap.
There are also additional tools in this repository, including:
- yarn scripts to parse a docmap and viewing the parsing output
- yarn script to generate some example docmaps, and the resulting output is stored in
examples/generated
The library is not published to NPM as of time of writing, but you can import the library direct from git:
yarn add "@elifesciences/docmap-ts@https://github.com/elifesciences/docmap-ts#v0.0.35"
The most useful part, the parser, can be invoked by passing a docmap as a string to parseDocmap()
:
import { parser } from '@elifesciences/docmap-ts';
const parsedOutput = parser.parsePreprintDocMap();
- nodejs
- yarn
To run the test suite, just run yarn test
.
run yarn parse ./path/to/docmap.json
run yarn generate
run yarn fetch-and-test-data-hub-docmap