Example #1
0
function docTask() {
	var jsDuck = new JsDuck( [
		'--out',               './docs/api',
		'--title',             'Autolinker v' + pkg.version + ' API Docs',
		'--examples',          './docs/examples.json',
		'--examples-base-url', './docs/'
	] );

	// JSDuck works solely on the file paths rather than the content, so
	// we needed the extra output directory for the transformed input 
	// .js files
	return gulp.src( [ 
		'./.tmp/docs-src/html-tag.js',  // we need to make sure html-tag.js is parsed first so that Autolinker.HtmlTag gets the correct class description rather than the static property found in autolinker.js
		'./.tmp/docs-src/**/*.js' 
	] )
		.pipe( jsDuck.doc() );
}
Example #2
0
function docTask() {
	var jsduck = new JsDuck( [
		'--out',               './docs/api',
		'--title',             'Autolinker v' + pkg.version + ' API Docs',
		'--examples',          './docs/examples.json',
		'--examples-base-url', './docs/'
	] );

	return merge(
		// Move dist files into the docs/ folder so they can be served
		// by GitHub pages
		gulp.src( `${distFolder}/**/*` )
			.pipe( gulp.dest( './docs/dist' ) ),

		gulp.src( srcFilesGlob )
			.pipe( jsduck.doc() )
	);
}
Example #3
0
function docTask() {
	var jsduck = new JsDuck( [
		'--out',               './gh-pages/docs',
		'--title',             'Autolinker API Docs',
		'--examples',          './gh-pages/examples.json',
		'--examples-base-url', './'
	] );

	return merge(
		gulp.src( srcFilesGlob )
			.pipe( jsduck.doc() ),

		gulp.src( `${distFolder}/**/*` )
			.pipe( gulp.dest( './gh-pages/dist' ) ),

		gulp.src( './examples/**' )
			.pipe( gulp.dest( './gh-pages/examples' ) )
	);
}
Example #4
0
	gulp.task(name, function() {
		return gulp.src(src)
			.pipe(gjsduck.doc());
	});