1.0.0 • Published 3 years ago

project.txt v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Project.txt JS

What is it?

This is is a library for parsing and processing project plans in the project.txt format. It provides no rendering functionality. If you want a ready-to-use editor, have a look at project.txt Viewer.

Usage

The library is written in TypeScript but should be consumable by any JavaScript project. Add it to your project using npm install project.txt.

import {parse, calculateDependencies, ProjectCalculationSettings} from "/project.txt";

// The project definition is expected as a string. You can get this from
// any source you would like, be it a file, a git repo, etc.
const projectDefinition = "[ ] some task";

const parseResult = parse(projectDefinition);
const project = parseResult.project;

// now you can extract the parsed information from the project
const tasks = project.tasks;
const firstTask = tasks[0];
const persons = project.persons;

// the library also has functionality to calculate task dependencies and
// task finish dates from the parsed project

const projectDependencyInformation = calculateDependencies(project, ProjectCalculationSettings.default());

// now you can find out which tasks are prerequisite for another task:
const prerequisitesForFirstTask = projectDependencyInformation.getPrerequisites(firstTask);

// or which persons are assigned to a task
const personsAssignedToFirstTask = projectDependencyInformation.getAssigments(firstTask);

// or when a task will be finished
const taskFinishDateOfFirstTask = projectDependencyInformation.getFinishDate(firstTask);
1.0.0

3 years ago

0.2.0

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.0.1

4 years ago