grunt-customize-bootstrap

Plugin to aid in overriding bootstrap less files without altering core files.

npm install grunt-customize-bootstrap
12 downloads in the last week
24 downloads in the last month

grunt-customize-bootstrap

Plugin to aid in overriding bootstrap less files without altering core files.

Getting Started

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-customize-bootstrap --save-dev

One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-customize-bootstrap');

The "customize_bootstrap" task

Overview

In your project's Gruntfile, add a section named customize_bootstrap to the data object passed into grunt.initConfig().

grunt.initConfig({
  customize_bootstrap: {
    your_target: {
      options: {
        components: 'components',
        src: 'src/bootstrap',
        dest: '.tmp',
        responsive: false
      }
    },
  },
})

Options

options.responsive

Type: Boolean Default value: false

Indicates whether or not to build the responsive stylesheets

options.components

Type: String Default value: components

Location of the bower components directory.

options.src

Type: String Default value: src/bootstrap

Location of the overridden bootstrap files. Must be a directory

options.dest

Type: String Default value: .tmp

Location to place the generated bootstrap.less (and possibly responsive.less).

options.local

Type: String Default value: null

Name of less file containing local styles to integrate into bootstrap.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 0.1.2 Added support for a local less file. Rewrote customize task to use grunt file api, synchronous operations.
  • 0.1.1 Initial (working) version. Does everything it claims to do.
  • 0.1.0 Initial version, doesn't work. See 0.1.1
npm loves you