less.js 325 字节
Newer Older
B
baiy 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
import prettier from "prettier/standalone";
import parserCss from "prettier/parser-postcss";
export const beautify = (code, option = {}) => {
    return prettier.format(code, {
        plugins: [parserCss],
        parser: "less",
        tabWidth: "tab" in option ? option.tab : 4
    });
}

export default {
    beautify
}