]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Use a Jekyll plugin instead of the `copy:configBridge` grunt task 15030/head
authorHeinrich Fenkart <hnrch02@gmail.com>
Wed, 5 Nov 2014 17:35:13 +0000 (18:35 +0100)
committerHeinrich Fenkart <hnrch02@gmail.com>
Wed, 5 Nov 2014 17:35:13 +0000 (18:35 +0100)
.gitignore
Gruntfile.js
docs/_plugins/bridge.rb [new file with mode: 0644]

index 49ccedc55315e49cfd7be93ceb0cf3244ad97255..84d48d86e28c87459c1983a44d436fb11249ce53 100644 (file)
@@ -2,7 +2,6 @@
 _gh_pages
 _site
 .ruby-version
-docs/_data/configBridge.json
 
 # Numerous always-ignore extensions
 *.diff
index eba9a55b79b2049b4ece5cf2d23e2f460d622609..8d293654e7166368d38850e2fbaf6ac1804a9f2d 100644 (file)
@@ -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 (file)
index 0000000..450a6cc
--- /dev/null
@@ -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