Comments (61)
does this mean there is currently no sourcemaps support?
from grunt-contrib-compass.
@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.
@robwierzbowski sourcemaps isn't even available in --pre
?
from grunt-contrib-compass.
@sindresorhus Not that I know of. These are the issues to track:
Compass/compass#1108
Compass/compass#1293
from grunt-contrib-compass.
Once this lands, we should evaluate if this interferes with the banner support from #59.
from grunt-contrib-compass.
+1
from grunt-contrib-compass.
+1
from grunt-contrib-compass.
+1
from grunt-contrib-compass.
+1s don't solve the issues, guys... people like "us" do...
from grunt-contrib-compass.
@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.
Sourcemaps will be an easy addition when they land in Compass, but we have to wait for that.
from grunt-contrib-compass.
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.
@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.
Any news on when this might be implemented?
from grunt-contrib-compass.
@ierpe
Sourcemaps will be an easy addition when they land in Compass, but we have to wait for that.
from grunt-contrib-compass.
still?
from grunt-contrib-compass.
+1
from grunt-contrib-compass.
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 :(
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:
Well, let's wait for sourcemaps official support on compass.
from grunt-contrib-compass.
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...
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.
@Sebastian-Fitzner it works for me,thanks!
from grunt-contrib-compass.
Thank you @RaphaelDDL and @Sebastian-Fitzner
Sourcemaps working here
from grunt-contrib-compass.
forgot to mention option:
raw: "sass_options = {:sourcemap => true}"
from grunt-contrib-compass.
@Sebastian-Fitzner Yup, that did it, thanks for finding that.
from grunt-contrib-compass.
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.
Thank you @cainmi. All good here.
from grunt-contrib-compass.
@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.
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.
@sillero cooool. it generated with sourcemap:true on options block. thanks a ton.
from grunt-contrib-compass.
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.
@mattma you need the alpha - gem install compass --pre
from grunt-contrib-compass.
@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.
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.
Updated ruby and now I'm getting the same error :(
from grunt-contrib-compass.
+1
from grunt-contrib-compass.
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.
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.
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.
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.
@jonjhiggins it works for me :) thank you, Now, I'm Waiting for final correction of the bug :)
from grunt-contrib-compass.
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.
@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.
The compass bug is fixed in Compass/compass@b4300d0 soon to be released.
from grunt-contrib-compass.
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.
🎊
from grunt-contrib-compass.
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.
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.
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.
Nice to know this features almost here. Is there a release date on Compass v 1.0.0 being stable?
from grunt-contrib-compass.
Any idea when this will be released?
from grunt-contrib-compass.
@azizur It already is and works. You can see for yourself here https://github.com/grayghostvisuals/sourcemaps/tree/compass/grunt
from grunt-contrib-compass.
Then why is this issue still open?
from grunt-contrib-compass.
+1 for SourceMaps
from grunt-contrib-compass.
+1
from grunt-contrib-compass.
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.
+1
from grunt-contrib-compass.
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.
Can also confirm what Augenfeind said. Worked exactly as expected. Now I have sourcemaps!
from grunt-contrib-compass.
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.
No, sourcemaps are used by the browser to point to other browser-available assets, so the source must be served.
from grunt-contrib-compass.
Well then I'll serve the files!
Thank you @robwierzbowski
from grunt-contrib-compass.
No problem. Have fun!
from grunt-contrib-compass.
Related Issues (20)
- Compiling fails on latest update. HOT 6
- Support Import-once activation from options HOT 2
- How to remove block comments? HOT 1
- grunt-contrib-compass fails with compass css3 mixins HOT 1
- ImportPath has capability to ** all sub directories HOT 3
- No error when compass-include-once is required but not installed HOT 2
- Any way to disable certain types of warnings? HOT 1
- Worked fine - then I get this error - only backing off to 0.9.0 fixed it. On Windows 7 HOT 2
- Grunt Compass Operation Not Permitted HOT 2
- Import of local CSS file does not work HOT 1
- Changes (0px) to (0) HOT 1
- Can't find `compass` after upgrade to newest version HOT 4
- Dynamic source directories
- Have to resave scss files twice in order for update to trigger HOT 2
- Grunt contrib compass is giving error - Individual stylesheets must be in the sass directory HOT 2
- Can't override relative assets
- Globbing functionnality
- Issue in 'specify'
- Grunt compass:dist task failing due to Invalid CSS in bootstrap-sass-official/assets/stylesheets/bootstrap/_variables.scss
- Drill-Down Dependency issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-contrib-compass.