문제

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