Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Frans de Jong 548 posts 1840 karma points MVP 4x c-trib
    Oct 12, 2015 @ 13:27
    Frans de Jong
    0

    .less dynamic compiler in Umbraco 7.2.8

    Hi,

    I looked through the project if there was a way to use less in Umbraco 7.2+. I did find a project wich made less possible but it uses the HTTP handler. I'd like to pre-compile less every time I save the less file or as soon as I hit a compile button?

    I'm not using Visual studio for my projects. So it has to be integrated in Umbraco.

    I found this project but it looks like it isn't compatible with U7.2+

    How are you all dealing with .less in Umbraco and less in combination with the grid?

    Thanks Frans

  • Comment author was deleted

    Oct 12, 2015 @ 13:38

    Hey Frans, you can also use https://our.umbraco.org/projects/developer-tools/optimus/

    It has an option to generate a css file based on your less on each save of the less file

  • Frans de Jong 548 posts 1840 karma points MVP 4x c-trib
    Oct 12, 2015 @ 13:49
    Frans de Jong
    0

    Hi Tim,

    Thanks for your reply. Does it fully support Umbraco 7.2.8? The project compatibility tab suggests tat Umbraco 7.2 isn't fully supported.

  • Comment author was deleted

    Oct 12, 2015 @ 15:48

    It should

  • Comment author was deleted

    Oct 12, 2015 @ 19:05

    Just tested and it works but you need to install the provides separately since the installation usercontrol was dependant on yahoo pipes and those seem to be gone.

    So first install the pacakge (will end up in a ysod with a yahoo pipes error, everything of the core is installed but the final step failed to display). SO then install the less provider.

  • Frans de Jong 548 posts 1840 karma points MVP 4x c-trib
    Oct 13, 2015 @ 07:49
    Frans de Jong
    0

    Hi Tim,

    The package indeed installed with a YSOD but after installing the less provider it worked.

    Is there documentation on how to use optimus? I can see where to create the less file but how can I specify where it should compile to?

    Thanks for the great support!!

  • Comment author was deleted

    Oct 13, 2015 @ 07:52

    You need to open the UmbracoCms.7.3.0\App_Plugins\Optimus\Config\bundles.config and update a setting there so it compiles to a css file

    It's the setting compileDynamicStyleSheetsToCss

    Once that is set to True

    It will save the compiled stylesheets to the css folder

  • Comment author was deleted

    Oct 13, 2015 @ 07:52

    Ah seems it is set to true by default so it should already compile it to the css folder

  • Comment author was deleted

    Oct 13, 2015 @ 07:58

    so the name you give to your less file like test.less it should then compile to test.css

  • Frans de Jong 548 posts 1840 karma points MVP 4x c-trib
    Oct 13, 2015 @ 08:00
    Frans de Jong
    0

    I'm sorry, I forgot to reload nodes in the css folder. Stupid user error.... It works like a charm.

    Is there any documentation on how to use the bundling section?

  • Comment author was deleted

    Oct 13, 2015 @ 08:03

    Sure thing, there is http://www.nibble.be/?p=241 and http://www.nibble.be/?p=237 (it features v6 screenshots but should still be similar on v7)

    You can basically select your styles/script on your view and then hit the new button in the toolbar

  • Frans de Jong 548 posts 1840 karma points MVP 4x c-trib
    Oct 13, 2015 @ 08:15
    Frans de Jong
    0

    Thanks Tim, awesome package you made!!

    I rated it working for 7.2+ in the project page.

    There are only two minor issues with the less files. - If I create a new file or folder I have to manually reload the nodes in the dynamic stylesheets to be able to see them. - Ctrl-s isn't working.

    Both aren't showstoppers.

    You've made my life a lot easier now :P

    Thanks

  • Comment author was deleted

    Oct 13, 2015 @ 08:16

    Thanks :) will look into those, don't forget to vote for it if you like it :)

  • Frans de Jong 548 posts 1840 karma points MVP 4x c-trib
    Oct 13, 2015 @ 09:20
    Frans de Jong
    1

    Like it? Love it!

    I did vote it up.

Please Sign in or register to post replies

Write your reply to:

Draft