2

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?

Chris
  • 133

2 Answers2

1

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.

Chris
  • 133
1

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.

Indrek
  • 24,874