Book Image

Build Applications with Meteor

Book Image

Build Applications with Meteor

Overview of this book

This book starts with the basic installation and overview of the main components in Meteor. You’ll get hands-on multiple versatile applications covering a wide range of topics from adding a front-end views with the hottest rendering technology React to implementing a microservices oriented architecture.All the code is written with ES6/7 which is the latest significantly improved JavaScript language. We’ll also look at real-time data streaming, server to server data exchange, responsive styles on the front-end, full-text search functionality, and integration of many third-party libraries and APIs using npm. By the end of the book, you’ll have the skills to quickly prototype and even launch your next app idea in a matter of days.
Table of Contents (16 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
8
Build a Chatbot with Facebook’s Messenger Platform

Bootstrap and Meteor


To style our shopping cart app, we will use Bootstrap 4 with Sass.

Open the shopping cart project and install Bootstrap.

At the time of writing this, Bootstrap 4 is still in alpha:

>> npm install [email protected]

Import it in the client/index.js file like any JavaScript module:

Meteor will add it to the head, and the browser will reload automatically; you will immediately note a difference in the design. The fonts and links will be styled and the app will look a little better.

As I mentioned earlier, everything in CSS is global.For example, what will happen if we, accidentally, have the same class name defined twice with a different value for the same property:

.shopping-cart-btn{
  background-color: red;
}

In another CSS file we have the same class name but this time we have a blue for background-color:

.shopping-cart-btn{
  background-color: blue;
}

The overriding priority in CSS is what makes it really hard to work with and difficult to scale. In the preceding...