A helper library for converting Markdown files to WordPress readme.txt
format.
Install using npm
as a development dependency:
npm install --save-dev @wpsh/to-wp-txt
const fs = require('fs');
const towptxt = require('@wpsh/to-wp-txt').default;
fs.readFile('readme.txt.md', 'utf8', (err, readme) => {
if (err) throw err;
fs.writeFile('readme.txt', towptxt(readme), err => {
if (err) throw err;
});
});
Created by Kaspars Dambis.