D
D
Dimalex2017-08-24 09:39:08
Command line
Dimalex, 2017-08-24 09:39:08

How to make LESS Compilation + Autoprefixer + Minification through one BAT file?

I want to compile less files through FileWatchers in PHPStorm, followed by processing with an autoprefixer and minification.
With a simple solution, I tried to sequentially execute commands through the BAT file, but only less compilation is performed, the autoprefixer and minification no longer work.
Plus, somehow you can transfer streams and not the files themselves (so as not to create intermediate css files) and get style.min.css at the output right away?
I know about Gulp, but just because of the large number of small projects, I don’t want to install Gulp in everyone (especially locally).
I would like to have a bat-nick to which you send a less file, and it returns minified css with all prefixes.
An example of my bat file (without auto-prefix so far):

C:\Users\Status\node_modules\.bin\lessc.cmd style.less style.css
C:\Users\Status\node_modules\.bin\yuicompressor.cmd style.css -o style.min.css

For some reason it doesn't work beyond the first line.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimalex, 2017-08-24
@Dimalex

Please forgive my illiteracy on commands in bat files :)
In fact, I solved my own question:
The question remains, is it possible to somehow get rid of the intermediate _style.css file?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question