Attempting to use sass watch

I just found this thread cause i had the exact same “problem”. I kept editing the files in www/lib/ionic as this is the standard in many other frontend environments.

Having to edit files outside the www directory goes against the standard ionic workflow and is not intuitive at all in my opinion.

If you dont want people to fumble with the “source styling” of ionic by default you could still copy the contents of /scss/ionic.app.scss to www/lib/ionic/scss/ionic.scss and make this file the central starting point.

It’s not that weird at all, in your www folder you only put files that have to be included in your application. Sass files are not to be included, they are to generate a css file that has to be included. Therefore I would say it is only natural to put it outside the www folder… But yeah, you got to notice to find it :slight_smile:

I have the same problem, I’ve given up, so I just launch two tabs with the following commands while I develop:

$] cd $MY_ROOT_DIR_OF_IONIC 
$] gulp watch ( tab 1 )
$] ionic serve ( tab 2 )

And just leave it … the only problem is that you never know if the “gulp watch” failed due to syntax error - it doesn’t recover, you need to execute it again.

#EDIT 2: just found the solution:
add to the $ROOT_PROJECT/ionic.project file the following gulp task:

  "gulpStartupTasks": ["sass", "watch"]

So it will be something like:

{
  "name": "ionic_project1",
  "email": "",
  "app_id": "",
  "package_name": "",
  "gulpStartupTasks": ["sass", "watch"]
}

Reloading the project via “ionic serve” will now execute gulp watch as well …