Giter VIP home page Giter VIP logo

shamin / webpack-sass-bootstrap-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
96.0 7.0 30.0 1.33 MB

Sass, Babel & Bootstrap boilerplate with Webpack building, Dev Server and Live Loading

Home Page: https://shamin.github.io/webpack-sass-bootstrap-boilerplate/

License: MIT License

HTML 6.04% JavaScript 66.33% SCSS 27.62%
webpack bootstrap4 sass babel webpackdevserver boilerplate jquery css es6 es6-javascript

webpack-sass-bootstrap-boilerplate's Introduction

webpack-sass-bootstrap-boilerplate

License Webpack Bootstrap Sass jQuery Webpack Dev Server

Sass · Babel · Bootstrap · Webpack · Webpack Dev Server · jQuery 3.5.1 · Popper.js

This Webpack Sass Bootstrap boilerplate starter contains the features and scripts you need to get started quickly with Webpack bundling and building, Live Loading,gzip-compression and creating a dev server.

It contains the following features:

  • Webpack 5 bundling
  • Babel ES6 Compiler
  • Sass Compiler
  • Bootstrap v4
  • jQuery 3.5.1
  • Popper.js
  • Webpack Dev Server
  • Generates gzip of both css and js files

Check Out Our Documentation

If you want to check out our official documentation, just click here.

It contains guidance on setting up this starter, as well as feature outlines.

Features

Webpack Loaders

This starter contains the following webpack loaders:

  • Sass Loader for compiling sass (SCSS)
  • File Loader for loading asset files
  • HTML Loader for loading HTML files
  • Babel Loader for compiling ES6 code

Webpack Plugins

The following webpack plugins are also included:

  • Extract Text Plugin for extracting CSS files
  • Clean Webpack Plugin for cleaning unwanted files in dist directory
  • HTML Webpack Plugin for generating HTML files
  • Webpack Provider Plugin for providing jQuery & popper js to Bootstrap
  • Glob for matching HTML files

Getting Started

Requirements

  • Please make sure you have NodeJS installed, as this contains npm, which is necessary for installing dependencies, starting the appropriate scripts, and building your web project.

Quick Start

Clone the repo:

git clone https://github.com/shaminmeerankutty/webpack-sass-bootstrap-boilerplate.git

Navigate to the project folder:

cd webpack-sass-bootstrap-boilerplate

Install all packages and dependencies required for this project:

npm install

Start the development environment (then, navigate to http://localhost:8080):

npm start

Then, open a browser and navigate to: http://localhost:8080/

Building files can be done as follows:

npm run build

How To Use

  • Add your HTML files by inserting or including them in the src directory (By default index.html is added to your src directory, feel free to edit it and experiment with the changes live.)

    • Make sure you restart development server after adding new HTML files
  • Add images to your src/assets folder.

  • Add sass (SCSS) files to src/scss folder.

    • Make sure you import the scss file in main.scss
    @import "filename";

Licence

Code released under the MIT License.

webpack-sass-bootstrap-boilerplate's People

Contributors

abhijithvijayan avatar dependabot[bot] avatar francomeriles avatar shamin avatar silvia-odwyer 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

webpack-sass-bootstrap-boilerplate's Issues

wrong path

After npm run build, the generated css file has bad path to linked resources ex.
'assets/' instead of '../assets/' or 'fonts/' istead of '../fonts/'

Create a documentation page

Need help with setting up a documentation page for this repo. Documentation page should be added in the docs directory at the project root, so that it can be served by github pages.

Set assets/images publicpath

The production build had issues with references to the image file and didn't load on the page in the build.

Test:
Reference an image in the index.html from src/assets/ and build the files and run the webpage

Fix:
Set publicPath: "/img/"

Using srcset attribute in img tags

Hey there!
I was wondering how you could configure so webpack processes the "srcset" attribute on img tags?
<img src="assets/cc-lockup.png" srcset="assets/[email protected] 2x, assets/[email protected] 3x" class="CC-Lockup">

Currently this code breaks because webpack doesn't make a copy of the '2x' and '3x' images

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.