Book Image

Bootstrap 4 Site Blueprints - Second Edition

By : Ian Whitney, David Cochran
Book Image

Bootstrap 4 Site Blueprints - Second Edition

By: Ian Whitney, David Cochran

Overview of this book

Packed with trade secrets, this second edition is your one-stop solution to creating websites that will provide the best experience for your users. We cover six popular, real-world examples, where each project teaches you about the various functionalities of Bootstrap 4 and their implementation. The book starts off by getting you up and running with the new features of Bootstrap 4 before gradually moving on to customizing your blog with Bootstrap and SASS, building a portfolio site, and turning it into a WordPress theme. In the process, you will learn to recompile Bootstrap files using SASS, design a user interface, and integrate JavaScript plugins. Towards the end of the book, you will also be introduced to integrating Bootstrap 4 with popular application frameworks such as Angular 2, Ruby on Rails, and React.
Table of Contents (15 chapters)
Bootstrap 4 Site Blueprints
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface

Putting it all together and creating the default task


At the end of the Gulpfile.js file we'll write down some tasks, including the default task, which runs a sequence of tasks of the build process. These tasks may look like the following:

gulp.task('set-development', development.task); 
gulp.task('set-production', production.task); 
gulp.task('test',['scss-lint','validate-html']); 
gulp.task('build', ['clean','copy','compile-js','compile-sass','compile-html']); 
gulp.task('default', ['set-development','server', 'watch']); 
gulp.task('deploy', ['set-production','server', 'watch']); 

The default task sets the environment to development by calling the set-development task first. Then it runs the server task, and starts the watch task after that. Because the server task depends on the build task, the build task always runs before the server task (Browsersync) starts. The deploys task does the same as the default task, but sets the environment to production in the...