swtf-fmt v1.0.9
SWTF Formatter
SWTF formatting tool
⚠️ This project is created to meet the needs of our development team. Our main focus currently won't be on maintainig this project.
Content
Installation
Install swtf-parser via npm:
npm i swtf-fmtInstall swtf-parser globally:
npm i -g swtf-fmtUsing CDN:
<script src="https://cdn.jsdelivr.net/npm/swtf-fmt@latest/dist/bundle.min.js"></script>or
<script src="https://unpkg.com/swtf-fmt@latest/dist/bundle.min.js"></script>Usage
Let's create simple example:
const { formatSwtf } = require('swtf-fmt');
const rawSwtf = `
- Daily tasks 😐:
- store: [borring]
- food
- coffee
- work: [borring]
- include e2e testing mechanism [p: high]
- improve load testing [p: medium]
- write today's tasks in SWTF [cool]
`;
console.log(formatSwtf(rawSwtf));Code above will output:
- Daily tasks 😐:
- store: [borring]
- food
- coffee
- work: [borring]
- include e2e testing mechanism [p: high]
- improve load testing [p: medium]
- write today's tasks in SWTF [cool]Magic attributes (IN DEVELOPMENT)
Use magic attributes to boost your experience of writing tasks in SWTF.
Magic attributes are way to enhance SWTF formatting. By default swtf-fmt provides set of magic attributes that can help you in managing and organizing your tasklists.
How does magic attributes work?
After parsing SWTF input using swtf-parser all attributes are going throug all registred Attribute Magic instances. Attribute Magic is process of handling special attribute names or values to enhance your SWTF experience.
List of default magic attributes:
| Value template | Description | Compiled example |
|---|---|---|
today | 26.05.2022. | |
after: {{value}} | 28.05.2022. | |
ready | status: ready | |
in_progress | status: in_progress | |
blocked | status: blocked | |
done | status: done | |
p1 | priority: 1 |