gulp-sass-bootstrap-boilerplate
gulp-sass-bootstrap-boilerplate copied to clipboard
โฐ๐ Boilerplate with gulp.js, Sass, Babel, and Browsersync.
gulp-sass-bootstrap-boilerplate
SASS ยท Babel ยท Bootstrap ยท Gulp ยท JQuery ยท PopperJS ยท Browsersync
This Gulp-Sass boilerplate starter contains the features and scripts you need to get started quickly with Gulp Runner and building, Live Loading.
๐โโ๏ธ Made by @abhijithvijayan
It contains the following features:
- GulpJS
- Babel ES6 Compiler
- Bootstrap v4
- JQuery v3.3.1
- PopperJS
- Concatenate and minify JavaScript.
- Compile, minify, autoprefix SASS.
- Browser-Sync Hot-Reloading
- Optimize and Cache Images
Features
Gulp Loaders and Plugins
This project contains the following loaders & plugins:
-
node-sass
for compiling sass (SCSS) -
gulp-babel
for compiling ES6 code -
Browser-sync
for hot-reloading -
gulp-uglify
for compressing JS -
gulp-clean-css
for compressing CSS -
gulp-sourcemaps
for mapping into css file -
gulp-rev
for filename hashing -
gulp-imagemin
for optimising images
Getting Started
Dependencies
Note: if you've previously installed Gulp globally, run npm rm --global gulp
to remove it. Details here.
Make sure these are installed first.
-
npm install --global gulp-cli
Quick Start
-
Clone the repo :
git clone https://github.com/abhijithvijayan/gulp-sass-boilerplate.git
-
In bash/terminal/command line,
cd gulp-sass-boilerplate
into project directory. -
Run
npm install
to install required files and dependencies. -
Launch the
development environment
with :gulp
then, navigate to http://localhost:3000
Note: For Production, Use:
gulp build
This will build files and assets to dist
directory.
Documentation
Workflow structure
src
- > source directory
dist
-> build directory
.
โโโ src
โ โโโ assets
โ โ โโโ 500x300.jpg
โ โโโ sass
โ โ โโโ _fonts.scss
โ โ โโโ _variables.scss
โ โ โโโ main.scss
โ โโโ index.js
โ โโโ index.html
.
.
โโโ dist
โ โโโ assets
โ โ โโโ 500x300.jpg
โ โ โโโ rev-manifest.json
โ โโโ css
โ โ โโโ style.min.css
โ โโโ js
โ โ โโโ bundle.min.js
โ โโโ index.html
.
Instructions
-
Add your HTML files by inserting or including them in the
src
directory (By defaultindex.html
is added to the directory, feel free to edit it with the changes seen live.)- For the new
HTML
file(s), link thestyles.css
(in head tag) andbundle.js
(in body tag) file in theHTML
files as they are created.<head> : <link rel="stylesheet" href="css/style.css" /> </head> <body> : <script src="js/bundle.js"></script> </body>
- For the new
-
Add
sass
(SCSS) files tosrc/sass
folder.- Make sure you import the scss file in
main.scss
@import "filename";
- Make sure you import the scss file in
-
Add
images
tosrc/assets
folder.
Licence
Code released under the MIT License.