Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Learning Ionic
  • Toc
  • feedback
Learning Ionic

Learning Ionic

By : Ravulavaru
4.4 (14)
close
Learning Ionic

Learning Ionic

4.4 (14)
By: Ravulavaru

Overview of this book

This book is intended for those who want to learn how to build hybrid mobile applications using Ionic. It is also ideal for people who want to explore theming for Ionic apps. Prior knowledge of AngularJS is essential to complete this book successfully.
Table of Contents (12 chapters)
close
11
Index

Setting up SCSS in our Ionic project


Now we will see how to set up SCSS in an existing Ionic project. We will start off by scaffolding a new tabs project. Create a folder named chapter4 and inside that open a new terminal/prompt and run:

ionic start -a "Example 13" -i app.example.thirteen example13 tabs

We can set up SCSS in our project in two ways:

  • Manual setup

  • Ionic CLI task

The manual setup

To set up SCSS manually, we will follow these steps:

  1. Using the cd command, step into the example13 folder:

    cd example13
    
  2. Install the required dependencies. The Ionic project that we scaffold from templates comes with a package.json file. This file already has all the dependencies needed to set up SCSS. Also, the project ships with a gulpFile.js, with the SCSS task defined, that watches for the changes in your SCSS files and builds the CSS file on-the-fly.

  3. To set up these dependencies, run this:

    npm install
    
  4. Also, if you did not install Gulp globally earlier, you can do so by running the following command:

    ...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete