From dcffbbab61fe717f5d379d417a5789b92a6ec488 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 17 Mar 2014 03:33:42 -0700 Subject: pass grunt into generateRawFilesJs instead of require()ing it --- grunt/bs-raw-files-generator.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'grunt') diff --git a/grunt/bs-raw-files-generator.js b/grunt/bs-raw-files-generator.js index fd74186cc..7637da942 100644 --- a/grunt/bs-raw-files-generator.js +++ b/grunt/bs-raw-files-generator.js @@ -10,7 +10,6 @@ 'use strict'; var fs = require('fs'); var btoa = require('btoa'); -var grunt = require('grunt'); function getFiles(type) { var files = {}; @@ -25,7 +24,7 @@ function getFiles(type) { return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'; } -module.exports = function generateRawFilesJs(banner) { +module.exports = function generateRawFilesJs(grunt, banner) { if (!banner) { banner = ''; } -- cgit v1.2.3 From 86dfcd1a96396fba1e65d9ffad3c34a5d8dc41a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sun, 9 Mar 2014 13:04:48 +0100 Subject: Add build-glyphicons-data log Closes #12987 --- grunt/bs-glyphicons-data-generator.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'grunt') diff --git a/grunt/bs-glyphicons-data-generator.js b/grunt/bs-glyphicons-data-generator.js index b71194367..82dc727b6 100644 --- a/grunt/bs-glyphicons-data-generator.js +++ b/grunt/bs-glyphicons-data-generator.js @@ -7,7 +7,7 @@ 'use strict'; var fs = require('fs'); -module.exports = function generateGlyphiconsData() { +module.exports = function generateGlyphiconsData(grunt) { // Pass encoding, utf8, so `readFileSync` will return a string instead of a // buffer var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8'); @@ -17,6 +17,7 @@ module.exports = function generateGlyphiconsData() { var iconClassName = /^\.(glyphicon-[^\s]+)/; var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' + '# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n'; + var glyphiconsYml = 'docs/_data/glyphicons.yml'; for (var i = 0, len = glyphiconsLines.length; i < len; i++) { var match = glyphiconsLines[i].match(iconClassName); @@ -30,5 +31,11 @@ module.exports = function generateGlyphiconsData() { fs.mkdirSync('docs/_data'); } - fs.writeFileSync('docs/_data/glyphicons.yml', glyphiconsData); + try { + fs.writeFileSync(glyphiconsYml, glyphiconsData); + } + catch (err) { + grunt.fail.warn(err); + } + grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.'); }; -- cgit v1.2.3 From cd13e22de107ce626bd994e75069626ad3a86b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Thu, 20 Mar 2014 21:12:59 +0100 Subject: #ffff -> #fff :smile: --- grunt/bs-lessdoc-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grunt') diff --git a/grunt/bs-lessdoc-parser.js b/grunt/bs-lessdoc-parser.js index 5a86f13a0..c1821de1c 100644 --- a/grunt/bs-lessdoc-parser.js +++ b/grunt/bs-lessdoc-parser.js @@ -22,7 +22,7 @@ Mini-language: //=== This is a subheading. //** Optional description for the following variable. You **can** use Markdown in descriptions to discuss `` stuff. - @foo: #ffff; + @foo: #fff; //-- This is a heading for a section whose variables shouldn't be customizable -- cgit v1.2.3