0.4.3 • Published 1 year ago

@sanity/tsdoc-to-portable-text v0.4.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@sanity/tsdoc-to-portable-text

Work in progress.

Installation

npm i @sanity/tsdoc-to-portable-text

Using the CLI

# Extract to etc/<version>.json using `tsdoc-to-portable-text etl` command
tsdoc-to-portable-text etl dist/index.d.ts --outDir etc/ --tsconfig tsconfig.dist.json

Using the Node.js API

import {extract, load, transform} from '@sanity/tsdoc-to-portable-text'

// Path to a package with a package.json file
const packagePath = __dirname

const result = await extract('dist/index.d.ts', {
  packagePath,
  tsconfigPath: 'tsconfig.dist.json',
})

const docs = transform(result, {package: {scope: null, name: 'mylib', version: '1.0.0'}})

await load(docs, {fs: {path: path.resolve(packagePath, 'etc/1.0.0.json')}})
0.3.2

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.2-next.1

2 years ago

0.3.2-next.6

2 years ago

0.3.2-next.5

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.18

2 years ago

0.1.18-next.20

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.14-next.10

2 years ago

0.1.13

3 years ago

0.1.13-next.19

3 years ago

0.1.13-next.18

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.9-next.19

3 years ago

0.1.9-next.21

3 years ago

0.1.9-next.2

3 years ago

0.1.9-next.1

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.5-next.32

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago