From 30df201abc482c5545bf4995feb957dec98d6d21 Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Wed, 5 Nov 2014 18:35:13 +0100 Subject: [PATCH] Use a Jekyll plugin instead of the `copy:configBridge` grunt task --- .gitignore | 1 - Gruntfile.js | 6 +----- docs/_plugins/bridge.rb | 9 +++++++++ 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 docs/_plugins/bridge.rb diff --git a/.gitignore b/.gitignore index 49ccedc553..84d48d86e2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ _gh_pages _site .ruby-version -docs/_data/configBridge.json # Numerous always-ignore extensions *.diff diff --git a/Gruntfile.js b/Gruntfile.js index eba9a55b79..8d293654e7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -283,10 +283,6 @@ module.exports = function (grunt) { docs: { src: 'dist/*/*', dest: 'docs/' - }, - configBridge: { - src: 'grunt/configBridge.json', - dest: 'docs/_data/configBridge.json' } }, @@ -457,7 +453,7 @@ module.exports = function (grunt) { grunt.registerTask('lint-docs-css', ['csslint:docs', 'csslint:examples']); grunt.registerTask('docs-js', ['uglify:docsJs', 'uglify:customize']); grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']); - grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'copy:configBridge', 'build-customizer']); + grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-customizer']); // Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json). // This task should be run and the updated file should be committed whenever Bootstrap's dependencies change. diff --git a/docs/_plugins/bridge.rb b/docs/_plugins/bridge.rb new file mode 100644 index 0000000000..450a6cce3e --- /dev/null +++ b/docs/_plugins/bridge.rb @@ -0,0 +1,9 @@ +require 'yaml' + +module Bridge + class Generator < Jekyll::Generator + def generate(site) + site.data["configBridge"] = YAML.load_file("./grunt/configBridge.json") + end + end +end \ No newline at end of file