Вопрос

On a Windows platform with Node running the following command

lessc style.less > style.css -x --yui-compress

Outputs a style.css in "UCS-2 Little Endian" format. Normally I wouldn't care, but I noticed my compiled stylsheets had huge file sizes (exactly double, upon inspection). For some reason this encoding doubles the file size when viewed in Windows Explorer.

Converting the files to UTF8 cuts the file size in half. Skipping -x and --yui-compress doesn't affect this.

Any ideas? I care because I don't want to have to work some sort of encoding converter into my build process.

Это было полезно?

Решение

try avoiding the > and just specifying the 2 arguments for in and out. When using piping (>) I assume it is the environment deciding the text format.

e.g.

lessc -x --yui-compress style.less style.css
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top