Skip to content
This repository was archived by the owner on Jan 25, 2019. It is now read-only.

Any chances of supporting LESS, SASS and/or CleverCSS CSS Processors out of the box? #77

Open
olivierdb opened this issue May 7, 2012 · 5 comments
Labels

Comments

@olivierdb
Copy link

I noticed a closed issue about SASS and using hooks, but I'm a newbie so I don't understand how to use it!

I would also prefer using LESS if I could!

@mythmon
Copy link
Owner

mythmon commented May 8, 2012

The tool support for compiling LESS appeared kind of weak when I was looking into it initially. It seemed like the preffered way was to include the javascript library, like described at the top of this page: http://lesscss.org/.

I will work on writing something up about how to use the SASS hooks that @robatron wrote.

@olivierdb
Copy link
Author

Thank you.

@olivierdb
Copy link
Author

There is a command line usage for LESS which works like this:

$ lessc styles.less > styles.css

To output minified CSS, simply pass the -x option. If you would like more involved minification, the YUI CSS Compressor is also available with the --yui-compress option.

It would be awesome if this option would be integrated in wok so that you could type something like wok --yui-compress and it would do the work.

@robatron
Copy link
Contributor

@olivierdb: With the latest version of Wok, you can use the existing contrib hook function compile_sass to compile any SASS files found in your output directory after site render to CSS. To use it, you would attach the compile_sass hook function to the 'site.output.post' hook in your <project_root>/hooks/__hooks__.py file like so:

  from wok.contrib.hooks import compile_sass

  hooks = {
    'site.output.post':[compile_css]
  }

@robatron
Copy link
Contributor

Also, I agree with @mythmon. I recommend using SASS over LESS. LESS is proving to be somewhat of a problem child in the greater webdev community :-/

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

No branches or pull requests

3 participants