Giter VIP home page Giter VIP logo

Comments (19)

namanyayg avatar namanyayg commented on June 10, 2024

+1

Trying to achieve the same thing. I've updated to sass 3.3.0 and compass 1.0.0.a19, but running gulp normally doesn't do the trick. Hope there's some workaround...

from gulp-compass.

appleboy avatar appleboy commented on June 10, 2024

@grayghostvisuals @namanyayg

Please update your sass, compass and gulp-compass as the following version

* sass (3.3.3)
* compass (1.0.0.alpha.19)
* gulp-compass (1.1.7)

from gulp-compass.

grayghostvisuals avatar grayghostvisuals commented on June 10, 2024

@appleboy

Compass 1.0.0.alpha.19
Sass 3.3.4
Ruby 2.1.1
Gulp-Compass 1.1.7
Gulp 3.5.5

Using the above versions with this config I don't get a .map file created for me.

from gulp-compass.

appleboy avatar appleboy commented on June 10, 2024

@grayghostvisuals where is your gulp-compass config?

https://github.com/grayghostvisuals/sourcemaps/blob/compass/gulp-compass/gulpfile.js

from gulp-compass.

grayghostvisuals avatar grayghostvisuals commented on June 10, 2024

@appleboy https://github.com/grayghostvisuals/sourcemaps/blob/compass/gulp-compass/gulpfile.js#L28-L41

That branch is setup to use gulp-compass and is listed in the package.json file https://github.com/grayghostvisuals/sourcemaps/blob/compass/gulp-compass/package.json#L6

from gulp-compass.

grayghostvisuals avatar grayghostvisuals commented on June 10, 2024

@appleboy
This issue is closed, but does not seem to be fixed. Would you mind reopening until the solution has been found and verified?

from gulp-compass.

appleboy avatar appleboy commented on June 10, 2024

@grayghostvisuals OK.

I will check your gulp config.

from gulp-compass.

griable avatar griable commented on June 10, 2024

Hi there,

I might be wrong but since compass' sourcemap flag only works used as a command line argument, gulp-compass currently doesn't allow to use a config.rb and sourcemap at the same time.

lib/compass.js#L72

if (opts.config_file) {
    options.push('-c', opts.config_file);
    //Support for environment
    if (opts.environment) { options.push('--environment', opts.environment); }
} else {
    [...]
    if (opts.sourcemap) { options.push('--sourcemap'); }
    [...]
}

from gulp-compass.

grayghostvisuals avatar grayghostvisuals commented on June 10, 2024

@appleboy Any status on this as of yet? I'm writing on this topic for CSS Tricks and would like to include this project as part of my article.

from gulp-compass.

appleboy avatar appleboy commented on June 10, 2024

@grayghostvisuals try the following config

gulp.src('css/src/styles.scss')
  .pipe(compass({
      sourcemap: true,
      debug : true,
      css: 'css',
      sass: 'css/src'
  }))
  .pipe(livereload(server))
  .pipe(gulp.dest('css'));

@griable is right.

Result:

$ ./node_modules/.bin/gulp  styles
[gulp] Using gulpfile /home/git/sourcemaps/gulpfile.js
[gulp] Starting 'styles'...
[gulp] gulp-compass: Running command: /usr/local/rvm/gems/ruby-2.1.1/bin/compass compile /home/git/sourcemaps /home/git/sourcemaps/css/src/styles.scss --relative-assets --debug-info --sourcemap --output-style nested --css-dir css --sass-dir css/src --images-dir images --javascripts-dir js --fonts-dir font
[gulp] /usr/local/rvm/gems/ruby-2.1.1/gems/bundler-1.5.3/lib/bundler/runtime.rb:220: warning: Insecure world writable dir /root in PATH, mode 040777

overwrite css/styles.css

   create css/styles.css.map

[gulp] Finished 'styles' after 672 ms

from gulp-compass.

grayghostvisuals avatar grayghostvisuals commented on June 10, 2024

@appleboy Yup. Commenting out the config_file line as @griable points out does in fact create a .map file, but I don't think that's a proper fix for this –do you?

from gulp-compass.

appleboy avatar appleboy commented on June 10, 2024

@grayghostvisuals Ya, I will try to fix it.

from gulp-compass.

grayghostvisuals avatar grayghostvisuals commented on June 10, 2024

@appleboy Awesome. I know it can certainly work without the config and setting it manually in the gulp file, but again it's nice to have the option than not at all. Thanks again for the help.

from gulp-compass.

appleboy avatar appleboy commented on June 10, 2024

@grayghostvisuals Please update to gulp-compass 1.1.9. It is working on your repository now. Please try it again.

from gulp-compass.

grayghostvisuals avatar grayghostvisuals commented on June 10, 2024

Excellent! Case closed. Thanks again for the work and help to get this running properly. Many peeps will appreciate it. 🍻

from gulp-compass.

Ziggizag avatar Ziggizag commented on June 10, 2024

I use [email protected] and no way - while transpililig SCSS file - sourcemap is not being generated, while it's so while using plain compass watcher.

This is my gulp:

gulp.task('compass', function() {
return gulp.src('app/sass/styles.scss')
.pipe(plumber())
.pipe(compass({
project: path.join(__dirname),
css: 'app/stylesheets',
sass: 'app/sass',
font: 'app/fonts',
image: 'app/images',
require: [
'bootstrap-sass',
'compass/import-once/activate'
],
sourcemap: true,
debug: true
}))
.on('error', function(error) {
console.log(error);
this.emit('end');
})
.pipe(plumber.stop())
.pipe(gulp.dest('app/stylesheets'));
});

This is so nasty as missing sourcemap is such a serious issue for a developer!!!

from gulp-compass.

Ziggizag avatar Ziggizag commented on June 10, 2024

Strange!!!

I have installed autoprefixer and problem seems to be gone!

from gulp-compass.

resting avatar resting commented on June 10, 2024

Hi Guys, here's my gulpfile.

gulp.task('css',function () {
    return gulp.src('sass/style.scss')
        .pipe(compass({
            sourcemap:true,
            debug:true,
            config_file:'./config.rb',
            css: './',
            sass:'sass'
        }))
        .pipe(postcss([autoprefixer({browsers: ['last 2 versions']})]))
        .pipe(gulp.dest(''))
});

I have sourcemap = true in my config.rb.

style.css.map is generated, but it's not loaded in the generated style.css. Is there something I'm missing?

Update:
So I tried removing postcss I do see the sourcemap now, but does compass do autoprefix automatically? Cause I'll need that feature.

from gulp-compass.

grayghostvisuals avatar grayghostvisuals commented on June 10, 2024

Compass has be deprecated in favor of eyeglass. It would be best if you don't use Compass anymore and go with another option like autoprefixer and LibSass.

from gulp-compass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.