Skip to content

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

Description

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

Getting started as a library

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();

Developing or using the repo

prerequisites

  • nodejs
  • yarn

Running tests

To run the test suite, just run yarn test.

Scripts

test the parser

run yarn parse ./path/to/docmap.json

regenerate the example docmaps

run yarn generate

parse eLife's docmap index

run yarn fetch-and-test-data-hub-docmap

Details


Assets

  • docmap-ts-0.0.36.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0