grt

gulp-readme-to-markdown

Convert WordPress.org readme.txt style files to GitHub flavored markdown.

Showing:

Popularity

Downloads/wk

2

GitHub Stars

7

Maintenance

Last Commit

5yrs ago

Contributors

4

Package

Dependencies

5

Size (min+gzip)

22.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gulp-readme-to-markdown

Converts WordPress.org readme.txt style files to GitHub flavored markdown. A simillar task is available for grunt by stephenharris.

Usage

npm install gulp-readme-to-markdown

In your gulpfile.js specify a task like the following:

var readme = require('gulp-readme-to-markdown');
gulp.task('readme', function() {
  gulp.src([ 'readme.txt' ])
  .pipe(readme({
    details: false,
    screenshot_ext: ['jpg', 'jpg', 'png'],
    extract: {
      'changelog': 'CHANGELOG',
      'Frequently Asked Questions': 'FAQ'
    }
  }))
  .pipe(gulp.dest('.'));
});

The result of this task can be seen in the Featured Video Plus repo.

Options

  • screenshot_url string: Screenshot URL skeleton. Can contain {plugin}, {screenshot} and {ext} which each will be replaced with their appropriate values. Default: https://ps.w.org/{plugin}/assets/{screenshot}.{ext}
  • screenshot_ext string/array: Either a string or an array of strings of the same size as there are screenshots. Default: png
  • uppercase boolean: Specifies if the filenames should be converted to uppercase when translated to .md. Default: true
  • extract array/object: Section names or object of section name: file basename pairs. Results in the specified sections being extracted into their individual file. By default no sections are extracted. You can use {basename} and {section} in the object's values which will be replaced by the source file's basename / the section name. Spaces in section name are converted to underscores. The uppercase option also applies for extracted file basenames. If an object is given you can also specify null as value to just remove a section instead of actually extracting it.
  • extract_basename string: The default basename for extracted files. Only used if an array and not an object is specified in the extract option. Default: {basename}_{section}
  • details boolean: If the details listing at the top of the readme file should be copied over. Default: true

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial