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-sassfor compiling sass (SCSS)gulp-babelfor compiling ES6 codeBrowser-syncfor hot-reloadinggulp-uglifyfor compressing JSgulp-clean-cssfor compressing CSSgulp-sourcemapsfor mapping into css filegulp-revfor filename hashinggulp-imageminfor 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-boilerplateinto project directory. -
Run
npm installto install required files and dependencies. -
Launch the
development environmentwith :gulpthen, 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
srcdirectory (By defaultindex.htmlis added to the directory, feel free to edit it with the changes seen live.)- For the new
HTMLfile(s), link thestyles.css(in head tag) andbundle.js(in body tag) file in theHTMLfiles 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/sassfolder.- Make sure you import the scss file in
main.scss@import "filename";
- Make sure you import the scss file in
-
Add
imagestosrc/assetsfolder.
Licence
Code released under the MIT License.