@m00nbyte/generate-humanstxt

1.0.1 • Public • Published

generate-humanstxt

NPM version

Generating humans.txt using nodejs

Getting Started

npm install --save-dev @m00nbyte/generate-humanstxt

Usage

import generateTxt from '@m00nbyte/generate-humanstxt';

const options = {
    team: [
        [
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' }
        ]
    ],
    thanks: [
        [
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' }
        ]
    ],
    site: [
        { key: '<Title>', value: '<Value>' },
        { key: '<Title>', value: '__date__' },
        { key: '<Title>', value: ['<Value>', '<Value>', '<Value>'] }
    ]
};

generateTxt(options)
    .then((content) => {
        console.log(content);

        return content;
    })
    .catch((error) => {
        throw error;
    });

If you pass __DATE__ as value, it will return the current date

For more informations about humans.txt check out the official website

CLI

node generate-humanstxt --config /path/to/config.json
  • path - optional path for humans.txt (this should contain the full path including the file name, example: /path/to/humans.txt).
  • options - see options above.

Contribution

Feel free to submit issues or pull requests.

Changelog

License

Package Sidebar

Install

npm i @m00nbyte/generate-humanstxt

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

7.24 kB

Total Files

6

Last publish

Collaborators

  • m00nbyte