Skip to content

Instantly share code, notes, and snippets.

@kopepasah
Last active December 25, 2015 07:39
Show Gist options
  • Save kopepasah/6940274 to your computer and use it in GitHub Desktop.
Save kopepasah/6940274 to your computer and use it in GitHub Desktop.
This function will compile style.less into style.css while converting the two spaces before the property into a tab. In addition, any comments that start with /** - will get a line inserted before that comment.
function compile-less() {
lessc style.less | sed -E 's/\ (.*): (.*);/ \1: \2;/;s/(\/\*\* -)/\
\1/' > style.css
}
lessc style.less | sed -E 's/\ (.*): (.*);/ \1: \2;/;s/(\/\*\* -)/\
\1/' > style.css
lessc style.less | sed -E 's/\ (.*): (.*);/ \1: \2;/' > style.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment