Boilerplate for building website using customized Bootstrap Media Queries and Grid system with SASS.
-
Download and Install Git
-
Download and Install Node.js ( Choose: Recommended for Most Users )
-
Create a file where you want to start your main project.
-
Then 'Right Click' on any white/empty space inside this file then choose 'Git Bash Here'.
-
A console will pop-up, then run this code to download the 'Boilerplatinator' then close the console after downloading
$git clone https://github.com/saysonjerald/boilerplatinator.git
-
Edit value of this property 'name', 'version' and 'description' inside the package.json file
-
Rename the 'Boilerplatinator' folder into your project name.
-
Open the 'Project Folder' folder then 'Right Click' on any white/empty space inside this file then choose 'Git Bash Here'.
$npm install live-server -g
-
Install Node Modules for this boilerplate.
$npm install
-
Delete the .git folder, sometimes it's hidden.
-
To activate LiveServer type:
$npm run devserver
-
To activate SASS Compiler :
$npm run watch:sass
-
I recommend to activate BOTH in one single CLI ( parallel mode ) :
$npm run start
-
Uncomment 'No Internet Script' in index.html if you have no internet connection
-
Use CDN as much as you can or else I will kill YOU!
-
Use BEM Architecture | Please make your life easier
-
Compile your SASS to CSS
$npm run compile:sass
output: sass/main.css
-
Merge all your CSS into one CSS file to reduce HTTP Requests - this will make your website load faster
$npm run concat:css
output: css/style.concat.css
-
This will make your website a higher chance to run on unsupported browsers.
$npm run prefix:css
output: css/style.prefix.css
-
Compressing the CSS File will make CSS execute faster on browsers
$npm run compress:css
output: css/style.css
-
Run all Scripts above using this command - I recommend to run this command for production purposes
$npm run build:css
output: css/style.css
- Grid breakpoints
xxxs: 0,
xxs: 320px,
xs: 568px,
sm: 667px,
md: 768px,
lg: 992px,
xl: 1200px,
xxl: 1440px,
xxxl: 1600px
- Container Max-Width
xxxs: 319px,
xxs: 414px,
xs: 568px,
sm: 608px,
md: 738px,
lg: 868px,
xl: 1092px,
xxl: 1330px,
xxxl: 1540px
Note: Don't be afraid to modify or add containers and breakpoint.
- Media Query
//max-width
@include respond-below($breakpoint-value){
property: value;
}
//min-width
@include respond-above($breakpoint-value){
property: value;
}
//between min and max width
@include respond-between($lower, $upper){
property: value;
}