Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed: https://github.com/appden/less.tmbundle and the lessc compiler and it seems to work (no errors) but I don't see a compiled .css file.

Any ideas?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

To change the filename from less > css, just use a simple replacement:

system("lessc --verbose \"#{file}\" \"#{file.gsub(/less$/, 'css')}\"")

Leaving the verbose flag will result in a nice feedback message stating your file has been saved to xxx.css.

share|improve this answer

I edited the bundle command to this:

#!/usr/bin/env ruby
file = STDIN.read[/lessc: ([^*]+\.less)/, 1] || ENV["TM_FILEPATH"]
system("lessc \"#{file}\" \"#{file}.css\"")

And now it works. But it saves a file (sample.less) to sample.less.css which is ok but not ideal.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.