Skip to content
This repository has been archived by the owner on Dec 29, 2024. It is now read-only.

Latest commit

 

History

History
55 lines (40 loc) · 1.46 KB

getting-started.md

File metadata and controls

55 lines (40 loc) · 1.46 KB

Getting Started

Installation

npm install tracey-cli --save-dev

Document Requirements

Document your project requirements in markdown files. Every requirement file is assigned a unique identifier as YAML frontmatter.

---
id: MyRequirement
---

# My Requirement
<!-- ... -->

Annotate Requirements

Annotate the requirement identifier in the source code. Use the @requirement annotation. An annotation consists of the requirement identifier and a description. The requirement identifier is written inside #[ and ]#. The description is written inside #( and )#.

/** @requirement #[ MyRequirement ]# #( This is the description )# */
function myFunction() {
    // ...
}

Configuration

Create a tracey.config.js in the project root and configure it according to the project. In the following example our requirements are documented in the requirements directory and our source code is within the src directory.

module.exports = {
    requirement: {
        startingpoints: [
            'requirements/**', // The startingpoint directory for requirement files
        ],
    },
    annotation: {
        startingpoints: [
            'src/**', // The startingpoint directory for source code annotations
        ],
    },
};

Generate Trace Links

Execute tracey in the project root.

Advanced Configuration

For advanced configuration options have a look at the Advanced Configuration Guide