]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Prevent the docs search from being generated twice when deploying to the live servers...
authorGeoff Kimball <geoff@zurb.com>
Mon, 4 Jan 2016 21:33:28 +0000 (13:33 -0800)
committerGeoff Kimball <geoff@zurb.com>
Mon, 4 Jan 2016 21:33:28 +0000 (13:33 -0800)
gulp/docs.js
gulpfile.js

index 1bae7e168ba5ad5cb3e5ccebc04c20b68ba13f03..ad6ea8c908c0bb034f374a6254a98bcca8320c0d 100644 (file)
@@ -32,7 +32,8 @@ gulp.task('docs', function() {
     .pipe(supercollider.init())
     .pipe(panini(PANINI_CONFIG))
     .pipe(cacheBust())
-    .pipe(gulp.dest('_build'));
+    .pipe(gulp.dest('_build'))
+    .on('finish', buildSearch);
 });
 
 gulp.task('docs:all', function() {
@@ -42,12 +43,13 @@ gulp.task('docs:all', function() {
     .pipe(supercollider.init())
     .pipe(panini(PANINI_CONFIG))
     .pipe(cacheBust())
-    .pipe(gulp.dest('_build'));
+    .pipe(gulp.dest('_build'))
+    .on('finish', buildSearch);
 });
 
-gulp.task('docs:search', ['docs'], function(cb) {
-  foundationDocs.buildSearch(supercollider.tree, cb);
-});
+function buildSearch() {
+  foundationDocs.buildSearch(supercollider.tree);
+}
 
 gulp.task('docs:debug', ['docs'], function(cb) {
   var output = JSON.stringify(supercollider.tree, null, '  ');
index e9dc09631d434bdd095b51ae18f7193799992cf3..e3945b2168e88251989be4ea4fc84a7a5d6c3097 100644 (file)
@@ -6,7 +6,7 @@ var port = process.env.SERVER_PORT || 3000;
 requireDir('./gulp');
 
 // Builds the documentation and framework files
-gulp.task('build', ['clean', 'copy', 'docs:all', 'docs:search', 'sass', 'javascript']);
+gulp.task('build', ['clean', 'copy', 'docs:all', 'sass', 'javascript']);
 
 // Starts a BrowerSync instance
 gulp.task('serve', ['build'], function(){