0.2.1 • Published 9 years ago
gulp-readme-to-markdown v0.2.1
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-markdownIn 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_urlstring: 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_extstring/array: Either a string or an array of strings of the same size as there are screenshots. Default:pnguppercaseboolean: Specifies if the filenames should be converted to uppercase when translated to.md. Default:trueextractarray/object: Section names or object ofsection name: file basenamepairs. 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. Theuppercaseoption also applies for extracted file basenames. If an object is given you can also specifynullas value to just remove a section instead of actually extracting it.extract_basenamestring: The default basename for extracted files. Only used if an array and not an object is specified in theextractoption. Default:{basename}_{section}detailsboolean: If the details listing at the top of the readme file should be copied over. Default:true