npm i -S start-less
import start from 'start';
import reporter from 'start-pretty-reporter';
import files from 'start-files';
import clean from 'start-clean';
import read from 'start-read';
import less from 'start-less';
import rename from 'start-rename';
import write from 'start-write';
export function build() {
return start(reporter())(
files('build/'),
clean(),
files('lib/**/*.less'),
read(),
less({ sourceMap: true }),
rename(file => file.replace(/\.less$/, '.css')),
write('build/')
);
}
Task is rely on [{ path, data, map }]
input and provide the same, see documentation for details.
less(options)
options
– Less options