Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Strip Sass extension from output file #215

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

Closed
wants to merge 1 commit into from

Conversation

SamyCookie
Copy link

Proposed fix for #55

@asottile
Copy link
Member

asottile commented Aug 8, 2017

I think at some point I wanted to unify this implementation with sass.compile_dirname -- though to me it's really unclear if anyone actually uses this functionality in its current state (due to the odd extension)

@SamyCookie
Copy link
Author

SamyCookie commented Aug 8, 2017

I just use it today by using distutils, hence that quick fix.

I try to migrate the compilation of my Sass code built by the legacy Ruby compiler with the Python version. Except the color issue and this one, all seems to be fine.

@dahlia
Copy link
Member

dahlia commented Aug 9, 2017

It would be better to add a bool parameter to determine whether to remove the .scss suffix or maintain the legacy behavior. After defaulting the legacy behavior for several minor releases (warning messages as well may be necessary), we'll be able to change the default behavior.

@lunkwill42
Copy link
Contributor

Well, darn it. I'm also trying to replace the Ruby legacy compiler in our toolchain with libsass and distutils, and just hit upon this same snag; all our output files are now named differently, since the .css part isn't stripped.

Two questions:

  1. Why are there separate overlapping implementations of this functionality in sass.compile_dirname and sassutils.build_directory?
  2. What can I do to help close Strip Sass extension from output file #55? I'm not sure I know distutils well enough yet to implement a boolean parameter, as @dahlia suggests...

@asottile
Copy link
Member

Why are there separate overlapping implementations

Originally sass.compile(dirname=...) was a thin wrapper around libsass's sass_compile_folder functionality -- however sass_compile_folder was removed and so that functionality was reimplemented in pure python as sass.compile_dirname: 202d657

What can I do to help close #55?

There's really only two parts to distutils integration, first you need to tell distutils the parameter exists and then use it!

In this case you'd need to funnel along something like sass_strip_extension into the sasutils.builder machinery

@lunkwill42
Copy link
Contributor

Thanks, @asottile . I seem to be having some other issues with how the distutils integration adds compiled css files to the distutils manifests, but I'll have to make a simpler proof-of-concept prototype just to see that the problem isn't just on my end.

However, I'll be at EuroPython next week (which may or may not improve my chances of looking at this) - and following that, I'm off on three weeks vacation - so there might be some time before I make myself heard again ;-)

@asottile
Copy link
Member

This'll be available in the next release (0.15.0) via #258 and #260 -- thanks for the PR!

@asottile asottile closed this Aug 27, 2018
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

Successfully merging this pull request may close these issues.

4 participants