Compiling Compass in an Ember-CLI project

前端 未结 2 1171
时光说笑
时光说笑 2021-01-21 10:55

I\'m using ember-cli v0.0.23, and am trying to get the broccoli-compass package working with my project, and I\'ve run into some problems.

First, in my Brocfile

相关标签:
2条回答
  • 2021-01-21 11:38

    Try this (added prefix and cssDir):

    var compileCompass = require('broccoli-compass');
    var styles = compileCompass(appAndDependencies, prefix + '/styles/app.scss', {
        outputStyle: 'expanded',
        sassDir: prefix + '/styles',
        imagesDir: 'public/images/',
        cssDir: '/assets'
    });
    

    Steffen

    0 讨论(0)
  • 2021-01-21 11:49

    You can use ember-cli-compass-compiler addon to compile compass in ember-cli apps.

    Just do the following in your ember-cli app:

    npm install --save-dev ember-cli-compass-compiler
    

    This is all you need to do, everything works as expected from now on. It compiles your appname.scss file into appname.css on ember build or ember serve command.

    0 讨论(0)
提交回复
热议问题