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 installto install our local dependencies listed inpackage.json. - Install following gulp task in terminal
npm install gulp-cli -gnpm install browser-syncnpm install delnpm install gulp-autoprefixernpm install gulp-cachenpm install gulp-changednpm install gulp-concatnpm install gulp-cssnanonpm install gulp-renamenpm install gulp-sassnpm 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
gulpin terminal and making some changes toassets/scss/**/*.scssand save it.2 files will automate updateassets/css/theme.cssandassets/vendor/bootstrap/dist/css/bootstrap.css
You also can running other gulp task with split terminal
- Run
gulp minCSSTHEMECompressingassets/css/theme.cssto minify filesassets/css/theme.min.css - Run
gulp minBOOTSTRAPCompressingassets/vendors/bootstrap/css/bootstrap.cssto minify filesassets/vendor/bootstrap/dist/css/bootstrap.min.css - Run
gulp minJSTHEMECompressingassets/js/theme.jsto minify filesassets/js/theme.min.js - Run
gulp minCSSCompressing 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 minJSCompressing 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 sassafter make changes in assets/scss/1 files will updateassets/css/theme.css- Run
gulp sass-bootstrapafter make changes inassets/scss/1 files will updateassets/vendor/bootstrap/dist/css/bootstrap.css - Run
gulp sass-customizerCompressingassets/scss/vendor/customizer/demo.scssto css filesassets/vendor/customizer/css/demo.css - Run
gulp minCUSTOMIZERCompressing assets/vendor/customizer/css/demo.css- to minify files
assets/vendor/customizer/css/demo.min.css - Run
gulp minJSCUSTOMIZERCompressing 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
