rstacruz / sinatra-assetpack

Package your assets transparently in Sinatra.
http://ricostacruz.com/sinatra-assetpack/
MIT License
542 stars 97 forks source link

Sass compiling with partials #189

Open FernE97 opened 9 years ago

FernE97 commented 9 years ago

Is it possible to have the main css file compile when updating a partial sass file from an @import? Right now the only time the css gets compiled is when the main sass file is changed.

app.rb

assets {
    serve '/css',    from: 'assets/css'

    css :app_css, '/css/app.css', [
        '/css/style.css'
    ]

    css_compression :sass, :output => :compressed
}

file structure

app
    |- assets/
        |- css/
            |- partials/
                |- _example.scss
            |- style.scss

style.scss

@import 'assets/css/partials/example';

_example.scss

body {
    background: #efefef;
}

So if I'm editing the _example.scss partial and say I change the background color to black, the css doesn't recompile until I go into the main style.scss file and make a change.

Not sure if I'm missing a setting somewhere or just don't have it set up properly. Thanks

aslakhellesoy commented 9 years ago

I'm having the same issue with less