Node Js
Bootnews uses NPM scripts for its build system. Our package.json
includes convenient methods for working with the framework, including compiling code, running tests, and more.
To use our build system and run our documentation locally, you’ll need a copy source files (Bootnews template) and Node js. Follow these steps and you should be ready to rock:
- Download and install Node.js, which we use to manage our dependencies.
- Navigate to the root /Bootnews directory and run
npm install
to install our local dependencies listed inpackage.json
. - Install following gulp task in terminal
npm install gulp-cli -g
npm install browser-sync
npm install del
npm install gulp-autoprefixer
npm install gulp-cache
npm install gulp-changed
npm install gulp-concat
npm install gulp-cssnano
npm install gulp-rename
npm install gulp-sass
npm install gulp-uglifyjs
- When completed, you’ll be able to run the various commands provided from the command line.
If you are using MacOS please use sudo
keyword in the command because they need administrator rights to install Gulp globally.
Gulp
After install gulp and node modules. Now you have an integrated workflow.
Automate Workflow
- Run
gulp
in terminal and making some changes toassets/scss/**/*.scss
and save it.2 files will automate updateassets/css/theme.css
andassets/vendor/bootstrap/dist/css/bootstrap.css
You also can running other gulp task with split terminal
- Run
gulp minCSSTHEME
Compressingassets/css/theme.css
to minify filesassets/css/theme.min.css
- Run
gulp minBOOTSTRAP
Compressingassets/vendors/bootstrap/css/bootstrap.css
to minify filesassets/vendor/bootstrap/dist/css/bootstrap.min.css
- Run
gulp minJSTHEME
Compressingassets/js/theme.js
to minify filesassets/js/theme.min.js
- Run
gulp minCSS
Compressing all css to one files (bundle) /assets/vendor/bootstrap/dist/css/bootstrap.css
/assets/vendor/fontawesome-free/css/fontawesome-for-theme.css
/assets/css/theme.css
- minify files
assets/bundle/css/theme.min.css
- Run
gulp minJS
Compressing all js to one files (bundle) /assets/vendor/jquery/dist/jquery.min.js
/assets/vendor/popper.js/dist/popper.min.js
/assets/vendor/bootstrap/dist/js/bootstrap.min.js
/assets/vendor/sticky-kit/dist/sticky-kit.min.js
/assets/vendor/owl.carousel/dist/owl.carousel.min.js
/assets/vendor/vanilla-lazyload/dist/lazyload.min.js
/assets/vendor/smoothscroll-for-websites/SmoothScroll.js
/assets/js/theme.js
- minify files
assets/bundle/js/theme.min.js
Sass
You can editing SCSS from assets/scss/**/*.scss
all variable is included in one file assets/scss/variable.scss
.
You can running Gulp sass to editing your css from scss file
- Run
gulp sass
after make changes in assets/scss/
1 files will updateassets/css/theme.css
- Run
gulp sass-bootstrap
after make changes inassets/scss/
1 files will updateassets/vendor/bootstrap/dist/css/bootstrap.css
- Run
gulp sass-customizer
Compressingassets/scss/vendor/customizer/demo.scss
to css filesassets/vendor/customizer/css/demo.css
- Run
gulp minCUSTOMIZER
Compressing assets/vendor/customizer/css/demo.css
- to minify files
assets/vendor/customizer/css/demo.min.css
- Run
gulp minJSCUSTOMIZER
Compressing assets/vendor/customizer/js/demo.js
- to minify files
assets/vendor/customizer/js/demo.min.js
BrowserSync
Makes your browser testing workflow faster by synchronising URLs, interactions and code changes across multiple devices
Running Browser sync with Gulp serve
and you can access browser from http://localhost:3000/
and starter pages can access from http://localhost:3000/html/home/index.html