Use Compass mixins in Brunch

636 views Asked by At

I`m trying to use the Compass-mixins plugin from git and compile with Brunch.

Problem is I cant use the mixins inside my main.scss. I have to import the the compass.scss for example but that makes compile time more than 2000ms, compared to 100ms. I`m sure there is another better way, that doesnt compile all the SCSS from compass or bourbon every time i change my main.scss. Here is my structure and config:

exports.config =
  # See http://brunch.io/#documentation for docs.
  modules:
    definition: false
    wrapper: false

  sourceMaps: false

  optimize: false

  files:
    javascripts:
      joinTo:
        'js/app.js' : /^app/
        'js/vendor.js' : /^(vendor|bower_components)/
      order:
        before: [
          'bower_components/jquery/jquery.js'
        ]

    stylesheets:
      joinTo:
        'css/app.css' : /^(app|bower_components)/
      order:
        before: [
         'app/styles/_settings.scss'
        ]
  plugins:
    sass:
     debug: false
      options:
        includePaths: [
          'bower_components/foundation/scss',
          'bower_components/compass-mixins/lib/compass'
        ]

My app structure is App -styles -styles/_settings.scss (for foundation) -styles/main.scss In If i include the compass in main works really slow. If I dont, it says the mixins i try to use are undefined.

Edit 1

Today I tested with bourbon and all works lightning fast. There seems to be a problem with compass-mixin its self.

1

There are 1 answers

0
es128 On BEST ANSWER

Update sass-brunch to v1.8.8 and in your brunch config set:

plugins:
  sass:
    mode: 'native'