-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration options
There's quite a lot you can configure in this module. Here's an overview of the options that are available to you:
<?php
array(
'twitter_bootstrap' => array(
'variables' => array(),
'included_components' => array(),
'excluded_components' => array(),
'included_plugins' => array(),
'excluded_plugins' => array(),
'plugin_alias' => 'js/bootstrap.js',
'filter' => array(
'node_bin' => '/usr/bin/node',
'node_paths' => array(),
),
),
);
These are the variables you can find on the customization page of twitter bootstrap and in the twitter/bootstrap/less/variables.less
file. You can also find all available variables for twitter bootstrap 2.3.0 here. You can overwrite these variables by simply supplying them in an array. Here's an example:
<?php
return array(
'twitter_bootstrap' => array(
'variables' => array(
'bodyBackground' => '#ededed',
'textColor' => '#8e8e8e',
),
),
);
This configuration option allows you to include (whitelist) components by name. This means that it will by default, not include any other component besides the ones you've defined. If it's not working, you might have forgotten to include a specific file. (variables.less gets included by default, but mixins doesn't.)
Here's an example:
<?php
return array(
'twitter_bootstrap' => array(
'included_components' => array(
'reset.less',
),
),
);
This option is the same as the previous one, except that it doesn't include but exclude components (blacklist). This means that all components get included by default, except for the ones defined. FontAwesome is a realistic reason for you to want to use this and exclude the sprites. Here's an example:
<?php
return array(
'twitter_bootstrap' => array(
'excluded_components' => array(
'sprites.less',
),
),
);
This option, again, is a lot like the previous two options. It allows you to include (whitelist) jquery plugins as packaged with twitter bootstrap. Normally, you'd have to use the format bootstrap-pluginname.js
, which I think is against the DRY principle. For that reason, you only have to supply the name of the the plugin. Here's an example:
<?php
return array(
'twitter_bootstrap' => array(
'included_plugins' => array(
'transition',
'button',
'carousel',
),
),
);
This option allows you to exclude (blacklist) jquery plugins as packaged with twitter bootstrap. Normally, you'd have to use the format bootstrap-pluginname.js
, which I think is against the DRY principle. For that reason, you only have to supply the name of the the plugin. Here's an example:
<?php
return array(
'twitter_bootstrap' => array(
'excluded_plugins' => array(
'tab',
'scrollspy',
'modal',
),
),
);
This option tells the module what to listen for when serving the plugins. If you (for some reason) wish to change this, it can be done with this option.
This module depends on node.js. For that same reason, it must know where to find the node binary. If it's not in the default location (/usr/bin/node), you must configure this option.
node.js has modules, and one of those modules is less. SxBootstrap depends on less and must therefor be able to locate it. If it's not in the default path, add it by setting this value.