From 8bd18ffce307df652e424f2fd9f632fd7b69d5b0 Mon Sep 17 00:00:00 2001 From: Xitij Ritesh Patel Date: Fri, 5 Feb 2016 14:01:37 -0500 Subject: [PATCH] Add option for custom $icon-font-path Add configuration option to disable the addition of the default $icon-font-path so we can use our own custom path within our Sass files. --- src/bootstrap.config.js | 2 ++ src/bootstrap.styles.loader.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap.config.js b/src/bootstrap.config.js index 8e50899c..3be9a1bc 100644 --- a/src/bootstrap.config.js +++ b/src/bootstrap.config.js @@ -86,6 +86,7 @@ export function createConfig({ bootstrapCustomizations, appStyles, useFlexbox: rawConfig.useFlexbox, + useCustomIconFontPath: rawConfig.useCustomIconFontPath, extractStyles: extractStyles || getEnvProp('extractStyles', rawConfig), styleLoaders: rawConfig.styleLoaders, styles: selectUserModules(rawConfig.styles, defaultConfig.styles), @@ -99,6 +100,7 @@ export function createConfig({ bootstrapVersion, loglevel, useFlexbox: defaultConfig.useFlexbox, + useCustomIconFontPath: defaultConfig.useCustomIconFontPath, extractStyles: extractStyles || getEnvProp('extractStyles', defaultConfig), styleLoaders: defaultConfig.styleLoaders, styles: selectModules(defaultConfig.styles), diff --git a/src/bootstrap.styles.loader.js b/src/bootstrap.styles.loader.js index dfeba03d..4336fe9b 100644 --- a/src/bootstrap.styles.loader.js +++ b/src/bootstrap.styles.loader.js @@ -20,6 +20,7 @@ module.exports = function() { styles, bootstrapRelPath, useFlexbox, + useCustomIconFontPath, preBootstrapCustomizations, bootstrapCustomizations, appStyles, @@ -47,7 +48,7 @@ module.exports = function() { createBootstrapImport('variables', bootstrapVersion, bootstrapRelPath) ); - if (bootstrapVersion === 3) { + if (bootstrapVersion === 3 && !useCustomIconFontPath) { processedStyles.push( `$icon-font-path: "${getFontsPath(bootstrapRelPath, this)}";` );