Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using in combination with gulp-ruby-sass #11

Closed
wayferer opened this issue Aug 7, 2014 · 6 comments
Closed

Using in combination with gulp-ruby-sass #11

wayferer opened this issue Aug 7, 2014 · 6 comments
Labels

Comments

@wayferer
Copy link

wayferer commented Aug 7, 2014

Hi there,

I'm new to all this so excuse me if this is the wrong place to ask but I am having an issue with my media queries not being combined. I have the following in my gulpfile:

gulp.task('sass',function () {
    gulp.src('_scss/main.scss')
        .pipe(sass({
            loadPath: ['_scss'],
            require: ['sass-media_query_combiner'],
            style: "compressed",
            trace: true,
            sourcemap: true,
            sourcemapPath: "../../../_scss",
            noCache: true
        }))
        .pipe(gulp.dest('resources/css'));
});

Any thoughts?

@aaronjensen
Copy link
Owner

hm, I've not used gulp to do it, sorry. It seems like it should work if that require directive is equivalent to sass -r ...

Does it error out or just not combine? Could you try compiling from the command line w/ sass -r sass-media_query_combiner?

@wayferer
Copy link
Author

wayferer commented Aug 8, 2014

Thanks for the reply. I tried finding out if it is equivalent but was unable to. I'm pretty new to Gulp so still trying to get my head around it. I normally manually built using the build tool in Sublime Text 2 so I know it works from the command line fine. There are no errors being thrown from what I can tell, it just doesn't combine. So I'm assuming that it's just not being called.

I tried posting an issue in the gulp-ruby-sass repo but haven't heard anything yet, so was hoping you might be able to shed some light.

@aaronjensen
Copy link
Owner

@wayferer it seems like the problem is actually sourcemap: true. If you set that to false then it works fine.

@aaronjensen
Copy link
Owner

Unfortunately, supporting source maps would take quite a bit of work and I probably won't get to it, sorry :/

@wayferer
Copy link
Author

Tested it and you're correct. Thanks for your help :)

@aaronjensen
Copy link
Owner

@wayferer you may want to check out https://github.com/hail2u/node-css-mqpacker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants