Skip to content

A gulp plugin that overrides Bootstrap's core Less or Sass files without modifying Bootstrap

Notifications You must be signed in to change notification settings

wildbit/gulp-customize-bootstrap

Repository files navigation

gulp-customize-bootstrap Build Status

A gulp plugin that overrides Bootstrap’s core Less or Sass files without modifying Bootstrap. This is a modified and extended version of grunt-customize-bootstrap.

See our examples for Bootstrap 3 and Bootstrap 4.

Install

npm install --save-dev gulp-customize-bootstrap

Usage

This plugin works using Bootstrap’s npm, bower, or static file installs. Just make sure you pass in the correct Bootstrap less or sass file using gulp.src.

Bootstrap 3 using Less

var customizeBootstrap = require('gulp-customize-bootstrap');
var less = require('gulp-less');

gulp.task('compileBootstrap', function() {
  return gulp.src('node_modules/bootstrap/less/bootstrap.less')
    .pipe(customizeBootstrap('styles/less/*.less'))
    .pipe(less())
    .pipe(gulp.dest('styles/'));
});

Bootstrap 4 using Sass

Make sure that Bootstrap 4 is installed.

npm – npm install [email protected]

Bower – bower install bootstrap#v4.0.0-alpha.2

var customizeBootstrap = require('gulp-customize-bootstrap');
var sass = require('gulp-sass');

gulp.task('compileBootstrap', function() {
  return gulp.src('node_modules/bootstrap/scss/bootstrap.scss')
    .pipe(customizeBootstrap('styles/scss/*.scss'))
    .pipe(sass())
    .pipe(gulp.dest('styles/'));
});

About

A gulp plugin that overrides Bootstrap's core Less or Sass files without modifying Bootstrap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published