Giter Club home page Giter Club logo

bootstrap-4-sass-gulp-4-boilerplate's Introduction

Bootstrap 4 boilerplate with sass and gulp 4

A Bootstrap 4.5.2 boilerplate with font-awesome5 free, sass, gulp 4 tasks, browserSync (with hot-reloading). You can override bootstrap sass variables by placing those variables in bootstrap-4-sass-gulp-4-boilerplate/assets/scss/_bootstrap_variable_overrides.scss

Pre-requisite

Install Gulp cli - Command Line Utility for Gulp

 $ npm install --global gulp-cli

Verify Gulp Cli and Gulp Local Version

 $ gulp --version

Getting started

  1. Clone repository: git clone https://github.com/JayeshLab/bootstrap-4-sass-gulp-4-boilerplate.git

  2. Change directory: cd bootstrap-4-sass-gulp-4-boilerplate

  3. Install all dependencies and libraries: npm install

  4. Run Gulp Task:

  • gulp - To compile scss to css, minify css and js and build ready for production files in dist folder.

  • gulp dev - Starts a local server with browserSync and hot reloading on changes to files (HTML, SCSS, JS).

bootstrap-4-sass-gulp-4-boilerplate's People

Contributors

jayeshlab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-4-sass-gulp-4-boilerplate's Issues

Watching sass files in sub-folders

If one organizes their Sass into subfolders, one must also update the gulpfile from gulp.watch('src/sass/*.scss' to gulp.watch('src/sass/**/*.scss' - I find though that this tiny change makes gulp recursively refresh every time the output CSS updates?! Not sure why that happens! haha

Minified versions of CSS and JS files are not called in the dist/index.html

Thos chunk of code does not do the hob it is supposed to (replace HTML block for Js and Css file upon build):

// Replace HTML block for Js and Css file upon build and copy to /dist
gulp.task('replaceHtmlBlock', function () {
  return gulp.src(['*.html'])
    .pipe(htmlreplace({
      'js': 'assets/js/app.min.js',
      'css': 'assets/css/app.min.css'
    }))
    .pipe(gulp.dest('dist/'));
});

Dist Html file asset path is not updates

Thanks for quick boilerplate,

When we run gulp build task index html get copied into dist folder but it shows 404 error for js file as in dist asset folder js file have min extension but same is not getting updated in index html

boostrap files copied on every run?

First of all - thanks for this!

When i run gulp dev and then change files I noticed it copies the bootstrap files over every time.
This means reload times can take seconds.

I patched it by running a separate css:minify task for dev and this task calls a separate scss task.

gulp.task('css:minify-dev', gulp.series('scss-dev', function cssMinify() {
  return ...
}));

The scss-dev task does not have the gulp.series('bootstrap:scss' ... in it
but there's probably a more elegant way.

how can I import other html files, other layers or components into an html file?

Hello sir!

How to split html into layers or components, for example, connect header or footer from another html file? Which lines of code should be added to gulpfile.js and how to import other html files located in the created components folder into an html file? I need to connect a lot of individual html files. Task: Splitting one html file into several. Please write how this can be done, if it is not difficult for you to explain. Thank you in advance!

import selective JavaScript from Bootstrap

Hi,

Thanks for the wonderful boilerplate! Would it be possible to import selective Bootstrap JavaScript that go's to the dist/js/vendor/bootstrap.bundle.min.js and how can that be done in this setup?

Regards,
David

gulp install command

Followed your instructions on my mac. Could not get gulp to run, got error below.
Did some checking, and apparently i had to install gulp using npm install -g gulp-cli, which worked.

MacBook-Pro:bootstrap4 user$ gulp dev
[10:24:32] Using gulpfile ~/Projects/BootstrapCSS/bootstrap4/gulpfile.js
/Users/user/.npm-global/lib/node_modules/gulp/bin/gulp.js:129
gulpInst.start.apply(gulpInst, toRun);
^
TypeError: Cannot read property 'apply' of undefined
at /Users/user/.npm-global/lib/node_modules/gulp/bin/gulp.js:129:20
at process._tickCallback (internal/process/next_tick.js:61:11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.