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

Less configuration? #1

Open
Nettsentrisk opened this issue Oct 29, 2013 · 3 comments
Open

Less configuration? #1

Nettsentrisk opened this issue Oct 29, 2013 · 3 comments

Comments

@Nettsentrisk
Copy link

Hi, I came across your project and am interested in getting it set up so that Cassette no longer is dependent on the hapless dotless project. However, I'm not finding this "Less configuration" that is supposed to be switched out. Where do I do this? I can't find the "old code" that's cited in the readme.

@nwyman
Copy link

nwyman commented Nov 7, 2013

You should be able to paste this anywhere in your project and it should work.

[ConfigurationOrder(20)]
  public class LessServices : IConfiguration<TinyIoCContainer>
  {
    public void Configure(TinyIoCContainer container)
    {
      container.Register<ILessJsCompiler, LessJsCompiler>().AsMultiInstance(); 

      container.Register<Cassette.IFileSearchModifier<StylesheetBundle>, Cassette.Stylesheets.LessJsFileSearchModifier>().AsSingleton();
    }
  }

@c0state
Copy link

c0state commented Dec 7, 2013

Did this work? I get an "Object reference not set to an instance of an object" exception on the Bundle.Reference call (when I reference the Less bundle). This is with the latest Cassette NuGet packages. I've uninstalled the original Cassette.Less package.

@CC1337
Copy link

CC1337 commented Jan 20, 2014

Hi,

Configuration as mentioned above works, maybe this should be added to documentation because I also was confused here.

@c0state: I got the same error, then tried a minimal test LESS file without "@import" statements and it worked. Step by step included all other files again, and figured out that this line calling lesshat caused the problem:

.lh-background-image(linear-gradient(to bottom, rgba(255, 255, 255, 1) 75%,rgba(255, 255, 255, 0.1) 100%));

Hope that helps, unless your Post is one month old.

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

No branches or pull requests

4 participants