From d2b509da576c5324fbba5980706ad7cb2736b8c9 Mon Sep 17 00:00:00 2001 From: Yves Gatesoupe Date: Thu, 17 Dec 2015 10:33:43 +0100 Subject: [PATCH] fix(doc): absolute paths remove '/' behind resources paths added grunt default task to build boosted --- Gruntfile.js | 26 +++++++++++++++++++++++++- package.json | 3 ++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 67e375a68d..1aee077f3f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -409,6 +409,19 @@ module.exports = function (grunt) { } }, + /* boosted mod */ + replace: { + remplace: { + src: ['_gh_pages/**/*.html'], + overwrite: true, + replacements: [{ + from: 'href="/', + to: 'href="' + }] + } + }, + /* end mod */ + htmllint: { options: { ignore: [ @@ -552,7 +565,9 @@ module.exports = function (grunt) { grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js', 'copy:fonts', 'copy:img']); // Default task. - grunt.registerTask('default', ['clean:dist', 'test']); + /* boosted mod */ + // grunt.registerTask('default', ['clean:dist', 'test']); + /* end mod */ // Version numbering task. // grunt change-version-number --oldver=A.B.C --newver=X.Y.Z @@ -608,5 +623,14 @@ module.exports = function (grunt) { 'watch' ]); }); + + grunt.registerTask('default', 'Build boosted', function (target) { + grunt.task.run([ + 'dist', + 'docs', + 'jekyll:docs', + 'replace' + ]); + }); /* end mod */ }; diff --git a/package.json b/package.json index 028c21086a..13b543cf85 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,8 @@ "mq4-hover-shim": "^0.3.0", "npm-shrinkwrap": "^200.1.0", "time-grunt": "^1.2.1", - "serve-static": "^1.10.0" + "serve-static": "^1.10.0", + "grunt-text-replace": "^0.4.0" }, "engines": { "node": ">=0.10.1"