From c1dbe040fe47257ff73e8c76e3431ab08cd070e1 Mon Sep 17 00:00:00 2001 From: Andy Joslin Date: Wed, 26 Mar 2014 09:30:01 -0600 Subject: [PATCH] chore(travis): make docs-index task skip files without yaml --- gulpfile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 1786bc2664..ab6d83a869 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -69,6 +69,11 @@ gulp.task('docs-index', function() { // Read out the yaml portion of the Jekyll file var title, layout; var yamlStartIndex = contents.indexOf('---'); + + if (yamlStartIndex === -1) { + return callback(); + } + var yamlEndIndex = contents.indexOf('---', yamlStartIndex+3); //starting from start var yamlRaw = contents.substring(yamlStartIndex+3, yamlEndIndex);