How to add Compass (SASS) to build process?


#1

This question already was asked in this post:

How to add Compass to the ionic 2 build process? Could you please provide an example?

There already is an answer in the link above, but it is aimed at another mixin (cropper). And is not compass related. I was not able to adapt the solution to compass…

Thank you in advance.


#2

If you’re not totally attached to Compass, I have Bourbon working:

  • add @import "_bourbon.scss"; to your app.scss
  • define a custom sass configuration file in package.json using ionic_sass as described here
  • copy the stock one from node_modules/@ionic/app-scripts/config/sass_config.js and add 'node_modules/bourbon/app/assets/stylesheets' to the includePaths stanza of it

How to add Linear gradient in variable.scss
#3

Thank you for the reply.

I’m afraid that bourbon does not support inline images. But maybe I can adapt your setup. I will post it if I’m successful.

( See: http://compass-style.org/reference/compass/helpers/inline-data/ )


#4

Since compass needs to run, and can’t be included as sass file, the solution provided can’t be adapted to compass…