Home Download Buy Blog Forum Support

ST2 + Less + Clever build

ST2 + Less + Clever build

Postby klierik on Thu Mar 07, 2013 5:24 pm

Hello there.

I work with project on LESS. I have primary file that @import a lot of other files.
Is it possible build promary file after any of other *.less files was saved? I mean build via ST2...

Or i need install and configure something like "watchr"?

PS: I use Mac OSX

Thanks
klierik
 
Posts: 3
Joined: Thu Mar 07, 2013 5:19 pm

Re: ST2 + Less + Clever build

Postby PhilippSchaffrath on Thu Mar 07, 2013 7:03 pm

You can use project-specific build systems.

Just go to Project->Edit Project and add a custom build system like this:

Code: Select all
{
   "folders":
   [
      {
         "path": "C:/.../folder2"
      },
      {
         "path": "C:/.../folder"
      }
   ],
   "build_systems":
    [
        {
            "name": "Only LESS",
            "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
            "selector": "source.css.less",
            "cmd":
            [
                "lessc.cmd",
                "C:/.../style.less",
                "C:/.../style.css"
            ]
        }
    ]
}


If you have done that, you can use this in your project. (just run the "Only LESS" build-system)

Hope that helps!
PhilippSchaffrath
 
Posts: 17
Joined: Sat Mar 10, 2012 1:24 pm

Re: ST2 + Less + Clever build

Postby klierik on Wed Mar 13, 2013 12:37 pm

thanks a lot for reply.

this menu item is non selectable :(

http://screencast.com/t/ugxCvgmre

ps: i open folder one of my projects in ST2
klierik
 
Posts: 3
Joined: Thu Mar 07, 2013 5:19 pm

Re: ST2 + Less + Clever build

Postby PhilippSchaffrath on Wed Mar 13, 2013 4:20 pm

That is probably because you did not have allready saved it as a project.
PhilippSchaffrath
 
Posts: 17
Joined: Sat Mar 10, 2012 1:24 pm


Return to General Discussion

Who is online

Users browsing this forum: sapphirehamster and 28 guests