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

Source Maps support #1

Closed
joaocunha opened this issue Mar 12, 2015 · 5 comments
Closed

Source Maps support #1

joaocunha opened this issue Mar 12, 2015 · 5 comments

Comments

@joaocunha
Copy link

Great stuff, buddy. I love writing everything in px. How about Source Maps support? I'm using the gulp version and it breaks it.

I tried .pipe(px2rem({replace: false}, {map:true})) and it inlines the sourcemap in a strange way. Using .pipe(px2rem({replace: false}, {map:{inline:false}})) to get an external map seems to have no effect whatsoever.

@ggkovacs
Copy link
Owner

Thanks. If you want to use sourcemaps you can use this: gulp-sourcemaps

@joaocunha
Copy link
Author

@ggkovacs I tried it. Would you mind showing me a snippet?

@ggkovacs
Copy link
Owner

gulpfile.js

'use strict';

var gulp = require('gulp');
var px2rem = require('gulp-px2rem');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('css', function() {
    gulp.src('main.css')
        .pipe(sourcemaps.init())
        .pipe(px2rem())
        .pipe(sourcemaps.write('../maps'))
        .pipe(gulp.dest('build'));
});

@andrewmartin
Copy link

Does this work? It seems to not work for me at all. I have a very similar setup to what @ggkovacs had.

@mqliutie
Copy link

Yeah, This config will delete sourceMappingURL

sourcemap will does not work!

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

No branches or pull requests

4 participants