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

Map Files #3

Open
theironcook opened this issue Apr 15, 2014 · 8 comments
Open

Map Files #3

theironcook opened this issue Apr 15, 2014 · 8 comments

Comments

@theironcook
Copy link

First - thanks for the asset pipeline and the sass plugin.

Second - is there any way I can generate map files via the plugin?

@davydotcom
Copy link
Contributor

It most definitely could be done , requires some Addons to this plugin

@davydotcom
Copy link
Contributor

Ok so I did a bit of checking on this. Sourcemaps are supported in sass 3.3.x, unfortunately compass stable release does not yet support sass above 3.2.x. So we have to wait.

@theironcook
Copy link
Author

@davydotcom - Thanks for checking.. maybe soon. would be very nice to edit sass directly in chrome someday

@Twintails
Copy link

Hi @davydotcom, I know there is no "official" release for Sass-GAP slated until compass is updated to 1.0.

I just wanted to share some progress I have made since you will probably know right off the top of your head what to do when the time comes for the Compass 1.0 release.

Also, Thanks for the plugin!

To get started: I wanted to implement some Sass 3.3 methods in a grails app I was recently assigned to, I didn't want to wait for the "Official" Compass 1.0 and have been playing with the alpha.

Research:
Frameworks were moved to compass-core and blueprint was removed to it's own gem "compass-blueprint" and depreciated from Compass.
--> http://beta.compass-style.org/CHANGELOG/ --> 0.13.alpha.8 (10/21/2013) Deprecations & Breaking changes

To start, I installed the new gems:
gem install sass 3.3.7
gem install compass --pre (this installed compass-core.1.0.0.alpha.19)

In the "sass-sset-pipeline-1.7.4/src/groovy/asset/pipeline/sass" directory
file "SassProcessor.groovy"

line 60-66

script.println("require 'compass' ");

script.println("end");script.println("Compass.reset_configuration!");
script.println("frameworks = Dir.new(Compass::Frameworks::DEFAULT_FRAMEWORKS_PATH).path ");
script.println("Compass::Frameworks.register_directory(File.join(frameworks, 'compass')) ");
script.println("Compass::Frameworks.register_directory(File.join(frameworks, 'blueprint')) ");
script.println("Compass.configure_sass_plugin! ");

I changed to:

lines 60-64

script.println("require 'compass-core' ");

script.println("require 'compass' ");
script.println("end");
script.println("Compass.reset_configuration!");
script.println("Compass.configure_sass_plugin! ");

This works to create the stylesheet after an initial "run-app", however, any changes to the Sass files are not being compiled. (not being watched?). So, when refreshing the browser the changes are not made. I'm positive that I am missing some component which caches??? the "Compass.reset_configuration!" from compass-core.

That is to say, the compass compile works once, but no subsequent changes are detected until stopping and calling "run-app" again and loading the files into the browser.

I really hope this is a help, it was only intended as such. Please forgive me if I'v wasted your time :-)
and thanks again for the plugin!

@davydotcom
Copy link
Contributor

Thanks for the information, Ill definitely look into this when we get Compass 1.0

@actionakin
Copy link

@Twintails I'm interested in any progress you might have made on the watch issue. I'm looking to do the same thing.

@Twintails
Copy link

@actionakin apologies for not seeing your message. for some reason all my rules on my mailbox were getting ignored and I haven't seen notifications to bring this to the top. Anyway, I had to revert back and wait for Compass 1.0 which is out now thankfully. I'm about to give it another go and see what breaks. :-)

@Twintails
Copy link

Woot! The solution above solved my issue.

(Note: The following isn't greatly important for the time being, I imagine changes will be made in the future of Sass-GAP.)

I got this on initial compile:

Compass.compiler is deprecated. Use Compass.sass_compiler instead.
Called from script:5:in `(root)'

which is a message in Compass 1.0
via. sass-asset-pipeline-1.9.0/src.groovy/asset/pipeline/sass/SassProcessor.groovy:169

The changes from
compass-1.0.0/lib/compass/compiler.rb
to
compass-1.0.0/lib/compass/sass_compiler.rb
are where my ruby skills get fuzzy and will need to defer to the brilliant minds behind Sass-GAP
:-)

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

No branches or pull requests

4 participants