diff --git a/gulp/lib/compile-dates.js b/gulp/lib/compile-dates.js index 8d3eacd..ec34dba 100644 --- a/gulp/lib/compile-dates.js +++ b/gulp/lib/compile-dates.js @@ -127,7 +127,7 @@ templateData.totalPages = totalPages; } - promises.push(new Promise(function (resolve, reject) { + promises.unshift(new Promise(function (resolve, reject) { gulp.src(rootPath + '/src/templates/index.hbs') .pipe(compileHandlebars(templateData, compileOptionsObj)) .pipe(rename('index.html')) diff --git a/gulp/lib/compile-home.js b/gulp/lib/compile-home.js index 862e875..a6835bb 100644 --- a/gulp/lib/compile-home.js +++ b/gulp/lib/compile-home.js @@ -125,7 +125,7 @@ templateData.totalPages = totalPages; } - promises.push(new Promise(function(resolve, reject) { + promises.unshift(new Promise(function(resolve, reject) { gulp.src(rootPath + '/src/templates/index.hbs') .pipe(compileHandlebars(templateData, compileOptionsObj)) .pipe(rename('index.html')) diff --git a/gulp/tests/compile-home.spec.js b/gulp/tests/compile-home.spec.js index e24c669..60eaca8 100644 --- a/gulp/tests/compile-home.spec.js +++ b/gulp/tests/compile-home.spec.js @@ -139,11 +139,11 @@ }); it('Should have the correct home page content for the second paginated page', function () { - expect(fs.readFileSync(rootPath + '/build/page/2/index.html', 'utf8')).to.equal('
'); + expect(fs.readFileSync(rootPath + '/build/page/2/index.html', 'utf8')).to.equal('
'); }); it('Should have the correct home page content for the third paginated page', function () { - expect(fs.readFileSync(rootPath + '/build/page/3/index.html', 'utf8')).to.equal('
'); + expect(fs.readFileSync(rootPath + '/build/page/3/index.html', 'utf8')).to.equal('
'); }); }); diff --git a/gulp/tests/compile-tags.spec.js b/gulp/tests/compile-tags.spec.js index 40fd952..4047b1f 100644 --- a/gulp/tests/compile-tags.spec.js +++ b/gulp/tests/compile-tags.spec.js @@ -155,11 +155,11 @@ }); it('Should have the correct content for the second paginated page', function () { - expect(fs.readFileSync(rootPath + '/build/tag/mocha/page/2/index.html', 'utf8')).to.equal('
'); + expect(fs.readFileSync(rootPath + '/build/tag/mocha/page/2/index.html', 'utf8')).to.equal('
'); }); it('Should have the correct content for the third paginated page', function () { - expect(fs.readFileSync(rootPath + '/build/tag/mocha/page/3/index.html', 'utf8')).to.equal('
'); + expect(fs.readFileSync(rootPath + '/build/tag/mocha/page/3/index.html', 'utf8')).to.equal('
'); }); });