# docusync

> The reason this project was created is the lack of tools that help you to run Living Documentation ecosystem. Documentation gets obsolete, it is not checked as part of the code review or pull request process if it lives outside and thus developers stop fo

Latest version **1.0.0** (published 2020-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install docusync
pnpm add docusync
yarn add docusync
bun add docusync
```

Provides the command `docusync`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-09-21 |
| First published | 2020-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 25.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ladislav Gazo |
| Maintainers | lgazo |

## Links

- npm: https://www.npmjs.com/package/docusync
- Repository: https://github.com/lgazo/docusync
- Homepage: https://github.com/lgazo/docusync#readme
- Issues: https://github.com/lgazo/docusync/issues
- npm.io page: https://npm.io/package/docusync

## Dependencies (10)

- [clui](https://npm.io/package/clui.md) 0.3.6
- [chalk](https://npm.io/package/chalk.md) 4.1.0
- [ramda](https://npm.io/package/ramda.md) 0.27.1
- [yargs](https://npm.io/package/yargs.md) 16.0.3
- [figlet](https://npm.io/package/figlet.md) 1.5.0
- [tslint](https://npm.io/package/tslint.md) 6.1.3
- [inquirer](https://npm.io/package/inquirer.md) 7.3.3
- [node-fetch](https://npm.io/package/node-fetch.md) 2.6.1
- [configstore](https://npm.io/package/configstore.md) 5.0.1
- [tslint-config-prettier](https://npm.io/package/tslint-config-prettier.md) 1.18.0

## Recent versions

- 1.0.0 (latest) — 2020-09-21

## README

# Introduction

The reason this project was created is the lack of tools that help you to run Living Documentation ecosystem. Documentation gets obsolete, it is not checked as part of the code review or pull request process if it lives outside and thus developers stop following it over the time.

In large projects the documentation lives outside one central repository, it is managed by different tools and might not be stored as source code at all. For Product Owners, Technical Writers and other non-development stakeholders it is usually more comfortable to write it in visual-friendly tools although the resulting format is e.g. Markdown.

**Docusync** is the tool that helps you synchronize such documentation to the source code and include it as part of the code reviews or release process.

It holds the list of relevant and related documentation resources and downloads the content of the resources to the source code so it can be easily reviewed.

# Process

A developer that works on a feature is obliged to write corresponding documentation. He might cooperate with an architect or analyst who also created a documentation related to the feature. All of these resources belong to the source code.

The developer `adds resources` to the synchronization list continuously throughout the progress of his work.

Once the feature is done, e.g. when it is ready for a **pull request**, the developer `downloads` content of the resources. The content is stored in the repository. The pull request is created along with documentation changes.

The documentation gets reviewed, commented and changed accordingly. Hopefully at least one another person would read it.

# Installation

You can install it as a global module or locally.

```
npm i docusync
```

# Configuration

Configuration for the tool is read from `$HOME/.config/configstore/docusync.json`

```json
{
  "base": {
    "dir": "build"
  },
  "credentials": {
    "default": {
      "username": "abc",
      "password": "nbusr123"
    }
  }
  ,"sources": {
    "default": {
      "module": "xwiki",
      "url": "https://xwiki.org",
      "target": {
        "dir": "docs/xwiki"
      }
    }
  }
}
```

The field `base` is optional. If not defined then current working directory is used.

> [!NOTE] nr.1 only `default` source works at the moment

> [!NOTE] nr.2 only XWiki system is supported at the moment although the implementation is open for other types

# Run

**Docusync** can be ran in two modes:

* interactive
* cli

At the moment the focus is on `cli` mode.

## Add a resource

It is as easy as: `docusync addResource https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide`

Such call will add the resource to the synchronization file located in `.docusync.json` in the directory from which the tool is called.

## Download

Once you are ready to synchronize the content, execute: `docusync download`.

It will download the content based on the synchronization file `.docusync.json` into the `target.dir` directory of the configured system.

> [!NOTE] at the moment the tool expects the format of the content in XWiki is Markdown and therefore it creates Markdown files in corresponding structure

# Inspiration

* XWiki inspiration in https://github.com/PayEx/xwiki-sync

# Development

## Publish

* follows https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c

---
_Source: https://npm.io/package/docusync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
