Code Monkey home page Code Monkey logo

Comments (61)

hamecoded avatar hamecoded commented on August 19, 2024

does this mean there is currently no sourcemaps support?

from grunt-contrib-compass.

robwierzbowski avatar robwierzbowski commented on August 19, 2024

@hamecoded: You can use the debug option, which is sourcemap-like, but Compass doesn't support the new Sass sourcemaps yet.

from grunt-contrib-compass.

sindresorhus avatar sindresorhus commented on August 19, 2024

@robwierzbowski sourcemaps isn't even available in --pre?

from grunt-contrib-compass.

robwierzbowski avatar robwierzbowski commented on August 19, 2024

@sindresorhus Not that I know of. These are the issues to track:

Compass/compass#1108
Compass/compass#1293

from grunt-contrib-compass.

passy avatar passy commented on August 19, 2024

Once this lands, we should evaluate if this interferes with the banner support from #59.

from grunt-contrib-compass.

fizerkhan avatar fizerkhan commented on August 19, 2024

+1

from grunt-contrib-compass.

RSeidelsohn avatar RSeidelsohn commented on August 19, 2024

+1

from grunt-contrib-compass.

Ahrengot avatar Ahrengot commented on August 19, 2024

+1

from grunt-contrib-compass.

stryju avatar stryju commented on August 19, 2024

+1s don't solve the issues, guys... people like "us" do...

from grunt-contrib-compass.

Ahrengot avatar Ahrengot commented on August 19, 2024

@stryju Sure, I get that – Thing is (And I can only speak for myself) I'd love to help and make a pull request with a patch, but I have no idea of the inner workings of grunt modules ... And since GitHub lacks any way to vote for features/issues it seems like a +1 in the comments is the only way to let those better than me know that there's actual demand for this given feature.

I'm no GitHub veteran, so if there's a better way to vote for features please do let me know.

from grunt-contrib-compass.

robwierzbowski avatar robwierzbowski commented on August 19, 2024

Sourcemaps will be an easy addition when they land in Compass, but we have to wait for that.

from grunt-contrib-compass.

diestrin avatar diestrin commented on August 19, 2024

I already used the new sass source maps via sass --pre and compass --pre.
We just need the way to send the sass_options: {sourcemap: true} to compass to output the sourcempas.

from grunt-contrib-compass.

0xjjpa avatar 0xjjpa commented on August 19, 2024

@diestrin had you been able to use Devtools to browse the actual sass code? Even with --pre, I haven't had such luck, but I think it was because some update on Chrome.

from grunt-contrib-compass.

erralb avatar erralb commented on August 19, 2024

Any news on when this might be implemented?

from grunt-contrib-compass.

sindresorhus avatar sindresorhus commented on August 19, 2024

@ierpe

Sourcemaps will be an easy addition when they land in Compass, but we have to wait for that.

from grunt-contrib-compass.

johannesjo avatar johannesjo commented on August 19, 2024

still?

from grunt-contrib-compass.

mcabrams avatar mcabrams commented on August 19, 2024

+1

from grunt-contrib-compass.

RaphaelDDL avatar RaphaelDDL commented on August 19, 2024

I use sourcemap generation with the modified compass gem, called compass-sourcemaps. But unfortunately seems it does not work when using it with grunt-contrib-compass, which is sad :(

image

Always return NoMethodError on line ["147"] of C: undefined method '__duration' for #< String:0x2b628e8 >.

If I turn sourcemap generation off on my config.rb, then works okay:

image

Well, let's wait for sourcemaps official support on compass.

from grunt-contrib-compass.

Sebastian-Fitzner avatar Sebastian-Fitzner commented on August 19, 2024

I got this error, too. After some reseach in the module I found, that the following code in compass.js is the problem:

// display compilation time
    if (!options.clean) {
      options.time = true;
    }'

If you comment that out. the module works with sourcemaps without any problems. Hope it helps...
image

You can find a gist of the file here: https://gist.github.com/Sebastian-Fitzner/7457178
And if you need a patch, here it is: https://github.com/Sebastian-Fitzner/patch-grunt-compass

from grunt-contrib-compass.

malei0311 avatar malei0311 commented on August 19, 2024

@Sebastian-Fitzner it works for me,thanks!

from grunt-contrib-compass.

sillero avatar sillero commented on August 19, 2024

Thank you @RaphaelDDL and @Sebastian-Fitzner
Sourcemaps working here

from grunt-contrib-compass.

darky avatar darky commented on August 19, 2024

forgot to mention option:
raw: "sass_options = {:sourcemap => true}"

from grunt-contrib-compass.

aradnom avatar aradnom commented on August 19, 2024

@Sebastian-Fitzner Yup, that did it, thanks for finding that.

from grunt-contrib-compass.

 avatar commented on August 19, 2024

Sourcemap support has been added to the compass alpha.

The time issue has been fixed in the compass alpha as well.

Revert changes to node_modules/grunt-contrib-compass/tasks/compass.js and run:

$ gem install compass --pre

In your Gruntfile.js (with other options):

compass: {
    scss: {
        options: {
            sourcemap: true
        }
    }
}

...and the sourcemap .map file gets generated fine.

from grunt-contrib-compass.

sillero avatar sillero commented on August 19, 2024

Thank you @cainmi. All good here.

from grunt-contrib-compass.

bsr203 avatar bsr203 commented on August 19, 2024

@sillero @cainmi can u please share the config. I put the below in mine, but couldn't get to work..

 compass: {
            scss: {
                options: {
                    sourcemap: true
                }
            },
            options: {
                //config: 'config.rb',
                sassDir: '<%= yeoman.app %>/styles',
                cssDir: '.tmp/styles/ae',
                //generatedImagesDir: '.tmp/images/generated',
                imagesDir: '<%= yeoman.app %>/images',
                javascriptsDir: '<%= yeoman.app %>/scripts',
                fontsDir: '<%= yeoman.app %>/styles/fonts',
                importPath: [
....

installed latest compass, sass too..

gem list

*** LOCAL GEMS ***

compass (1.0.0.alpha.17)
compass-core (1.0.0.alpha.16)
compass-import-once (1.0.1)
compass-validator (3.0.1)
css_parser (1.3.4, 1.2.6)
...
sass (3.3.0.rc.2)
sass-globbing (1.0.0)

thanks

from grunt-contrib-compass.

sillero avatar sillero commented on August 19, 2024

unless you are calling compass:scss, it looks like the second option is being used and you don't have sourcemap: true there

from grunt-contrib-compass.

bsr203 avatar bsr203 commented on August 19, 2024

@sillero cooool. it generated with sourcemap:true on options block. thanks a ton.

from grunt-contrib-compass.

mattma avatar mattma commented on August 19, 2024

I am using the latest 0.7.1 and with options: { sourcemap: true }, but it still cannot generate any .map file, it even failed on running the task with error message

Running "compass:debug" (compass) task
Error: invalid option: --sourcemap

Output the 'compass --help' options.

I am using another way to compile sass file with terminal compiler below:

I do have a config.rb file with sourcemap option on. When I use 'compass compile', I am able to successfully generate .map file. I am sure that System sass & compass are ready for generating .map file.

Are you going to release a patch any time soon on this matter?

Thanks

from grunt-contrib-compass.

 avatar commented on August 19, 2024

@mattma you need the alpha - gem install compass --pre

from grunt-contrib-compass.

mattma avatar mattma commented on August 19, 2024

@cainmi I have tried with new compass 1.0.0.alpha.18, i still got some errors.

I am using the grunt-contrib-compass 0.7.1

        compass: {
            options: {
                sassDir: '<%= CONFIGS.STYLES %>/sass',
                cssDir: '<%= CONFIGS.STYLES %>',
                imagesDir: '<%= CONFIGS.ASSETS %>/images',
                javascriptsDir: '<%= CONFIGS.APP %>',
                fontsDir: '<%= CONFIGS.ASSETS %>/fonts',
                relativeAssets: true
            },
            debug: {
                options: {
                    sourcemap: true,
                    debugInfo: false,
                    environment: 'development',
                    noLineComments: true, //Disable line comments.
                    outputStyle: 'expanded'
                }
            }
}

See the debug task option 'sourcemap' set to true, it did not work. I tried to remove it, and it works great. Look at the doc of grunt-contrib-compass, it does not have this option at all. Simply bump the compass version, it did not fix the problem unless that I did not something wrong here.

so that I am running command grunt compass:debug

I received the error below after I add the 'sourcemap' option

NoMethodError on line ["87"] of /path/to/user/.rvm/gems/ruby-1.9.3-p194/gems/compass-1.0.0.alpha.18/lib/compass/actions.rb: undefined method `index' for nil:NilClass

from grunt-contrib-compass.

jefBinomed avatar jefBinomed commented on August 19, 2024

I have the exact same error as mattma... But what is strenght is that according to my development environment. the sourcemap is generate or not. I have the configuration install on two computers and on the first one, the sourcemaps files are generated but on the other, they aren't.....

Is the version of ruby important ? and same thing for gem version ? Else, I have the same version of gem plugins

Computer where it works :
*** LOCAL GEMS ***

bigdecimal (1.1.0)
chunky_png (1.2.9)
compass (1.0.0.alpha.17, 0.12.2)
compass-core (1.0.0.alpha.16)
compass-import-once (1.0.2)
compass-sourcemaps (0.12.4.sourcemaps.a4836f1)
ffi (1.9.3 x86-mingw32)
fssm (0.2.10)
io-console (0.3)
json (1.5.4)
listen (1.1.6)
minitest (2.5.1)
multi_json (1.8.4)
rake (0.9.2.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.3)
rb-kqueue (0.2.0)
rdoc (3.9.4)
sass (3.3.0.rc.2, 3.3.0.alpha.134, 3.2.13)

Computer where it doesn't work :

*** LOCAL GEMS ***

bigdecimal (1.2.0)
celluloid (0.15.2)
chunky_png (1.3.0)
compass (1.0.0.alpha.18, 0.12.2)
compass-core (1.0.0.alpha.17)
compass-import-once (1.0.2)
ffi (1.9.3 x64-mingw32)
fssm (0.2.10)
io-console (0.4.2)
json (1.7.7)
listen (2.4.1, 1.1.6)
minitest (4.3.2)
multi_json (1.8.4)
psych (2.0.0)
rake (0.9.6)
rb-fsevent (0.9.4)
rb-inotify (0.9.3)
rb-kqueue (0.2.0)
rdoc (4.0.0)
sass (3.3.0.rc.3, 3.3.0.alpha.134, 3.2.14)
test-unit (2.0.0.0)
timers (1.1.0)

regards

from grunt-contrib-compass.

 avatar commented on August 19, 2024

Updated ruby and now I'm getting the same error :(

from grunt-contrib-compass.

ariesjia avatar ariesjia commented on August 19, 2024

+1

from grunt-contrib-compass.

 avatar commented on August 19, 2024

oddly sass --compass --sourcemap --watch sass/styles.scss:app/css/styles.css works
i've tried rolling back to @jefBinomed's 'working' version to no avail.
I had this working before I rebuilt my mac. Maybe something to do with ruby? Any help really appreciated.

from grunt-contrib-compass.

dunnkers avatar dunnkers commented on August 19, 2024

I'd really appreciate if this would work, I'm also getting the NoMethodError:

    Warning: NoMethodError on line ["87"] of C: undefined method `index' for nil:NilClass
    Run with --trace to see the full backtrace Use --force to continue.

    Aborted due to warnings.

I ran grunt serve.

from grunt-contrib-compass.

pablodenadai avatar pablodenadai commented on August 19, 2024

I'm also getting the same error.

 Warning: NoMethodError on line ["87"] of C: undefined method `index' for nil:NilClass
    Run with --trace to see the full backtrace Use --force to continue.

    Aborted due to warnings.

from grunt-contrib-compass.

jonjhiggins avatar jonjhiggins commented on August 19, 2024

Finally managed to get sourcemaps working with grunt-contrib-compass:

1. Error "Warning: NoMethodError on line ["87"]".

Fixed by downgrading to:

  • compass (1.0.0.alpha.16)
  • compass-core (1.0.0.alpha.16)
  • sass (3.3.0.rc.2)

Thanks to: Compass/compass#1557 (comment)

2. Error "NoMethodError on line ["175"]

Fixed by editing node_modules/grunt-contrib-compass/tasks/compass.js, comment out options.time = true; on line 49

Thanks to: #23 (comment)

from grunt-contrib-compass.

jefBinomed avatar jefBinomed commented on August 19, 2024

@jonjhiggins it works for me :) thank you, Now, I'm Waiting for final correction of the bug :)

from grunt-contrib-compass.

grayghostvisuals avatar grayghostvisuals commented on August 19, 2024

Still getting the errors mentioned above which includes suggested fixes listed. This however will work with Gulp ATM. I've made a repo called “sourcemaps” that contains branches for each use case. Here's the branch that is using Compass with Grunt. https://github.com/grayghostvisuals/sourcemaps/tree/compass/grunt

from grunt-contrib-compass.

 avatar commented on August 19, 2024

@jonjhiggins @jefBinomed you can bump compass up to alpha 17 while leaving compass-core at 16... this will eliminate the need for the manual time error fix as it was patched in that version.

from grunt-contrib-compass.

chriseppstein avatar chriseppstein commented on August 19, 2024

The compass bug is fixed in Compass/compass@b4300d0 soon to be released.

from grunt-contrib-compass.

Traxmaxx avatar Traxmaxx commented on August 19, 2024

Can confirm it's working with

  • sass (3.3.3)
  • compass (1.0.0.alpha.19)
  • grunt-contrib-compass (0.7.2)

from grunt-contrib-compass.

chriseppstein avatar chriseppstein commented on August 19, 2024

🎊

from grunt-contrib-compass.

boycce avatar boycce commented on August 19, 2024

Thanks to @Traxmaxx, i can also confirm it's working with:

  • sass (3.3.3)
  • compass (1.0.0.alpha.19)
  • grunt-contrib-compass (0.7.2)

Needed to install these remote gems first before installing downloaded (from rubygems) compass gem.

  • compass-core -v 1.0.0.alpha.19
  • compass-import-once -v 1.0.3

from grunt-contrib-compass.

dunnkers avatar dunnkers commented on August 19, 2024

I've also got it working with:

  • compass-1.0.0.alpha.19
  • grunt-contrib-compass-0.7.2

and gems:

  • sass-3.3.5
  • compass-core-1.0.0.alpha.19
  • compass-import-once-1.0.4

install gem compass -v 1.0.0.alpha.19 automatically grabbed sass-3.3.5 and the other dependencies for me.

from grunt-contrib-compass.

romanbloeth avatar romanbloeth commented on August 19, 2024

Just updated my 0.12.4.sourcemaps.a4836f1 by typing gem install compass -v 1.0.0.alpha.19 and everything is running just fine! I didn't check for the source maps. Unfortunately running the grunt-contrib-compass task with the option raw: 'sass_options = { :sourcemap => true }' does currently not create CSS source maps on my system.
PS: Got it running now - had to replace the raw option with the new sourcemap: true. All good!

from grunt-contrib-compass.

anthonyhastings avatar anthonyhastings commented on August 19, 2024

Nice to know this features almost here. Is there a release date on Compass v 1.0.0 being stable?

from grunt-contrib-compass.

azizur avatar azizur commented on August 19, 2024

Any idea when this will be released?

from grunt-contrib-compass.

grayghostvisuals avatar grayghostvisuals commented on August 19, 2024

@azizur It already is and works. You can see for yourself here https://github.com/grayghostvisuals/sourcemaps/tree/compass/grunt

from grunt-contrib-compass.

koenpunt avatar koenpunt commented on August 19, 2024

Then why is this issue still open?

from grunt-contrib-compass.

masterspambot avatar masterspambot commented on August 19, 2024

+1 for SourceMaps

from grunt-contrib-compass.

FloNeu avatar FloNeu commented on August 19, 2024

+1

from grunt-contrib-compass.

jonjaques avatar jonjaques commented on August 19, 2024

For those wanting to use sourcemaps on new projects, as of 7/30/14, the following should work.

gem install compass --pre

Then flip this option on in your task config

sourcemap: true

Protip: If you're working with multiple developers, I would recommend using bundler in order to keep your dependencies locked. Also make sure to add bundleExec: true in your task config as well.

Until Compass 1.0 is released (which I believe is the reason this is still open), Please help us by not posting +1's. Thanks!

from grunt-contrib-compass.

vilmosioo avatar vilmosioo commented on August 19, 2024

+1

from grunt-contrib-compass.

RSeidelsohn avatar RSeidelsohn commented on August 19, 2024

Compass 1.0.1 is available. No --pre option needed any more. Uninstall old compass and sass installations and then simply install compass (gem install compass). It comes with an up-to-date version of SASS.
Everything works fine with grunt-contrib-compass 0.9.1 and the gem compass 1.0.1

from grunt-contrib-compass.

intellix avatar intellix commented on August 19, 2024

Can also confirm what Augenfeind said. Worked exactly as expected. Now I have sourcemaps!

from grunt-contrib-compass.

mchambaud avatar mchambaud commented on August 19, 2024

Seems I have to serve the sass dir for sourcemaps to work. Is there a workaround so express does not need to serve the scss files?

from grunt-contrib-compass.

robwierzbowski avatar robwierzbowski commented on August 19, 2024

No, sourcemaps are used by the browser to point to other browser-available assets, so the source must be served.

from grunt-contrib-compass.

mchambaud avatar mchambaud commented on August 19, 2024

Well then I'll serve the files!

Thank you @robwierzbowski

from grunt-contrib-compass.

robwierzbowski avatar robwierzbowski commented on August 19, 2024

No problem. Have fun!

from grunt-contrib-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.