@wixc3/docs
TypeScript icon, indicating that this package has built-in type declarations

17.1.1 • Public • Published

npm version @wixc3/docs on Github

Home > @wixc3/docs

docs package

Tool + CLI for docs generation from TSDocs

Remarks

Templates

Site pages includes the following templates from docs-config:

  • index.md - main page header

  • package.md - packages root page header

  • item.md - header for other files

Macros

There are many awesome macros you can use in your TDDocs. Using macros look like this [[[macro and args]]]

npm version @wixc3/docs on Github

Home > @wixc3/docs-macros

docs-macros package

Variables

Variable Description
github

A link to the package on github

Usage: inside a ts-docs comment block:

[[[github caption?]]]

githubBuildStatus

A github build status badge

Usage: inside a ts-docs comment block:

[[[githubBuildStatus]]]

githubPages

A link to the project's github pages

Usage: inside a ts-docs comment block:

[[[githubPages uri? caption?]]]

where uri can be an inner page

if caption is provided a markdown link will be created, otherwise the raw root URL will replace the macro

gitRepo

Project's current package name, in a url friendly format

Usage: inside a ts-docs comment block:

[[[gitRepo field?]]]

where field can be: host | org | repo | pages | github

h

Heading - since ts-docs to not natively allow for markdown formatting, this macro is used to create a #, ##, ## etc

Usage: inside a ts-docs comment block:

[[[h level title]]]

include

Include another markdown file (that may also have macros)

Usage: inside a ts-docs comment block:

[[[include path]]]

listMacros

Lists all the available macros

Usage: inside a ts-docs comment block:

[[[listMacros]]]

npmBadge

A npm version badge

Usage: inside a ts-docs comment block:

[[[npmBadge]]]

packageName

Project's current package name

Usage: inside a ts-docs comment block of a package:

@wixc3/docs

Will be replace by the full package name, i.e @wixc3/docs-macros

packageNameUrl

Project's current package name, in a url friendly format

Usage: inside a ts-docs comment block of a package:

[[[packageNameUrl]]]

This is useful for generating links and badges

rootPackageName

Project's root package name

Usage: inside a ts-docs comment block:

[[[rootPackageName]]]

unscopedPackageName

Project's current package name, unscoped

Usage: inside a ts-docs comment block of a package: *docs

Will be replace by the full package name, i.e bla for @wixc3/bla

Example 1

Generate automatically updated github pages
yarn add @wixc3/docs
yarn docs init
git push

Example 2

Build documentation locally
yarn docs build

Example 3

Generate README.md in all packages (after docs build)
yarn docs readme

Functions

Function Description
buildDocs(config, steps, macros) Build docs markdown
cli()
createReadme(config, siteUrl)
init(config, force)

Initialize docs pre-requisites:

- Adds api-extractor.json to packages

- Adds git pages action

- Creates configs and templates in docs-config

Type Aliases

Type Alias Description
BuildSteps
Macros
UserConfig

Dependencies (9)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @wixc3/docs

    Weekly Downloads

    87

    Version

    17.1.1

    License

    MIT

    Unpacked Size

    330 kB

    Total Files

    174

    Last publish

    Collaborators

    • dorza
    • vladba-wix
    • danielgovrin
    • yurimorkovnik
    • ranberko91
    • 0xrezaa
    • gregdamsky
    • alissawix
    • ekaterinaza
    • noammu
    • buchenpilar
    • oleksiiletushev
    • alisalachman
    • vladyslav-baliuk
    • yuriin
    • ilyakwix
    • matang
    • daomry
    • noama
    • shakederin
    • dlvhdr
    • plisovyi
    • pijusn
    • shireewill
    • haryelp
    • iuriikowix
    • itaywix
    • thealmightycrumb
    • devex-infra
    • olehr
    • tomrav
    • avi.vahl
    • alexswix
    • omerk
    • talga
    • cijoe
    • wix-ci
    • wixnpm
    • baraki
    • interal
    • alisey
    • danieleww
    • idoros
    • nadavwix
    • rashellek
    • wtfil
    • denysdovhan
    • vkobeliatskyi
    • pistolpete_
    • nettaru
    • igalh
    • netanelgilad
    • anatfenn
    • erezshasha
    • zemlanin
    • arnonkehat
    • ariki
    • itpurchases
    • danalevy
    • serhiiz
    • oleksandraab
    • idango10
    • mikanadel
    • tetiana0611
    • vladkar
    • yurii-v
    • elig-wix
    • nadav.a
    • vladyslavgoloshchapov