New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@living-papers/transforms

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@living-papers/transforms

Built-in Living Papers AST transforms.

latest
npmnpm
Version
0.1.8
Version published
Maintainers
1
Created
Source

Living Papers: Transforms

Library of external transforms for Living Papers ASTs.

Transform Registration

To be used by Living Papers, a transform implmentation must also be registered with Living Papers at compile time. Transform information is provided in a package.json file, typically found in the root directory of a package.

Registration Format

Here is an example registration for a single transform (omitting other package.json entries):

{
  "living-papers": {
    "transforms": [
      {
        "name": "knits",
        "file": "src/knitr/index.js"
      }
    ]
  }
}

A registration object supports two properties:

  • name: (required) The name of the custom transform. To apply the transform, this name should be included in a Living Papers article metadata block, under the transforms: key.
  • file: (required) The source file containing the transform definition, relative to the package.json file. The transform is assumed to be the default export of the file.

Transform Resolution

The compiler attempts to resolve transforms in the following increasing precedence order. Later entries can override earlier ones.

  • The included components from this package (@living-papers/transforms).
  • Any custom transforms registered in {inputDir}/package.json.

If a component entry starts with ./, ../, or /, it is treated as a path relative to the input directory. Otherwise, the component entry is treated as an npm package name. External packages must also be included as dependencies in a projects package.json file.

FAQs

Package last updated on 25 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts