gcanti / docs-ts

A zero-config documentation tool for my TypeScript projects
https://gcanti.github.io/docs-ts/
MIT License
101 stars 17 forks source link

feat(core): Support any path in src in the examples #12

Closed gillchristian closed 4 years ago

gillchristian commented 4 years ago

This PR adds support for the following form of imports:

Currently the only supported import types in the @example blocks are:

Tests

There are no tests for src/core so I did some manual tests by running in this repo and in fp-ts as well.

CLI output in the Asciicast:

asciicast

Here is also a Asciicast of a project I have that fails with master but works with the PR:

asciicast


NOTE: I know this is a tool for your own projects and it aims to be opinionated. I will understand if you don't think the PR should be merged. I decided to create the PR since is a small change in code, instead of asking in an issue.

gcanti commented 4 years ago

@gillchristian no problem, thanks for this PR. Released.