Sublime Forum

ST2 + Less + Clever build

#1

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

0 Likes

#2

You can use project-specific build systems.

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

{
	"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!

0 Likes

#3

thanks a lot for reply.

this menu item is non selectable :frowning:

screencast.com/t/ugxCvgmre

ps: i open folder one of my projects in ST2

0 Likes

#4

That is probably because you did not have allready saved it as a project.

0 Likes