Sha256: 24e5f1b0f01e6c525dbe6906879679bcf8c178c392db4b7034e04285069ba305

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

var Toc = require('markdown-toc');
var Fs = require('fs');
var Package = require('./package.json');

var filename = './API.md';

var api = Fs.readFileSync(filename, 'utf8');
var tocOptions = {
    bullets: '-',
    slugify: function (text) {

        return text.toLowerCase()
            .replace(/\s/g, '-')
            .replace(/[^\w-]/g, '');
    }
};

var output = Toc.insert(api, tocOptions)
    .replace(/<!-- version -->(.|\n)*<!-- versionstop -->/, '<!-- version -->\n# ' + Package.version + ' API Reference\n<!-- versionstop -->');

Fs.writeFileSync(filename, output);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/hapi/node_modules/joi/generate-readme-toc.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/hapi/node_modules/joi/generate-readme-toc.js
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/hapi/node_modules/joi/generate-readme-toc.js