Unable to Setup Sass


#1

I have a new project and in my package.json I have the following

  "dependencies": {
    "async": "^1.4.0",
    "bower": "^1.3.3",
    "gulp": "^3.5.6",
    "gulp-angular-templatecache": "^1.5.0",
    "gulp-sass": "2.3.2",
    "gulp-sourcemaps": "^1.5.2",
    "gulp-util": "^2.2.14",
    "require-dir": "^0.3.0",
    "shelljs": "^0.3.0"
  },

I’ve done an npm install and also have tried to force a download via> npm install gulp-sass; however, when trying to run sass, I’m getting the following

D:\development\my_app>ionic setup sass
[ERROR] Unable to find command: setup sass

Any ideas?


#2

You are probably using Ionic CLI v3: https://github.com/ionic-team/ionic-cli/blob/master/CHANGELOG.md#removed-commands


#3

OK, so given the change-log, if I’m understanding correctly I do not need to do anything to my project if I created it in CLI v3 for example ‘ionic start my_new_project’

Also, this would mean that since SASS is handled in start, I do not need to do anything with gulp-sass correct?


#4

That’s how I would read it - but I don’t use Ionic v1.


#5

I just ran into this so basically, yap.

No need to do anything, just edit the ionic.app.scss file in scss folder and Ionic will automatically generate compiled files in your /css folder

Just refference them in index.html like

<link href="css/ionic.app.css" rel="stylesheet">

and you’re good to go