Skip to content

Plugin for gulp, to automate protagonist/blueprint building

License

Notifications You must be signed in to change notification settings

jvanharn/gulp-protagonist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gulp snowcrash to create documentation with API Blueprint

This libary is gulp-snowcrash with updated dependencies by nicgordon and an updated name to make it more easily findable.

Usage

Usage only for generating the JSON representation.

var protagonist = require('gulp-protagonist');

gulp.task('docs', function () {
	return gulp.src('./blueprint/**/*.md')
		.pipe(protagonist({ format: 'json' }))
		.pipe(gulp.dest('./_blueprint'));
});

Usage if you want to combine this with something like Blueman.

var protagonist = require('gulp-protagonist'),
	exec = require('child_process').exec;

gulp.task('docs:blueprint', function () {
	return gulp.src('./blueprint/blueprint.md')
		.pipe(protagonist({ format: 'json' }))
		.pipe(gulp.dest('./_blueprint'));
});
gulp.task('docs:blueman', function(cb){
    exec('blueman convert ./blueprint/blueprint.md --host=http://example.com/api/ --output=./blueprint/blueprint_collection.json', function (err, stdout, stderr) {
        util.log(stdout);
        util.log(stderr);
        cb(err);
    });
});
gulp.task('docs', ['docs:compile', 'docs:blueman']);

About

Plugin for gulp, to automate protagonist/blueprint building

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%