aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Fenkart <[email protected]>2014-11-05 18:52:09 +0100
committerHeinrich Fenkart <[email protected]>2014-11-05 18:52:09 +0100
commit03834866654025396530e5c4dddcd74cd214db30 (patch)
tree88a0710c840ae9525b7be3ba69291ac5e3ca248c
parente27dc5d71e962effae1ec3b67fa72f77b14d3d98 (diff)
parent30df201abc482c5545bf4995feb957dec98d6d21 (diff)
downloadbootstrap-03834866654025396530e5c4dddcd74cd214db30.tar.xz
bootstrap-03834866654025396530e5c4dddcd74cd214db30.zip
Merge pull request #15030 from twbs/config-bridge-jekyll-plugin
Use a Jekyll plugin instead of the `copy:configBridge` grunt task
-rw-r--r--.gitignore1
-rw-r--r--Gruntfile.js6
-rw-r--r--docs/_plugins/bridge.rb9
3 files changed, 10 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 49ccedc55..84d48d86e 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 eba9a55b7..8d293654e 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 000000000..450a6cce3
--- /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