I have Windows 10 (64 bits), Cygwin, Nodejs installed via Windows Installer and lessc
installed on top of Nodejs.
I am trying to make django-compressor
work with precompilers as suggested in documentation:
COMPRESS_PRECOMPILERS = (
#...
('text/less', 'lessc {infile} {outfile}'),
#...
)
It throws
lessc: ENOENT: no such file or directory, open 'C:\awkwardly\converted\cygwin\path\to\my\file.less'
(Notice the drive letter added)
I tested the command lessc
from the Cygwin console. It works fine as long as I use relative paths, but when I use an absolute path it converts it to Windows path, even prepending a drive letter, something like
C:\cygdrive\d\projects\my\path\to\file.less
How can I fix/workaround this?
So far, the option is using
cygpath
to feedlessc
with an appropriate windows path, like this:Also, output must be redirected to
{outfile}
and not passing{outfile}
as parameter.