@mypaas/hcm-cli
Version:
Vant Cli 是一个 Vue 组件库构建工具,通过 Vant Cli 可以快速搭建一套功能完备的 Vue 组件库。
21 lines (20 loc) • 756 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const fs_extra_1 = require("fs-extra");
const path_1 = require("path");
function default_1(content) {
if (this.resourcePath.endsWith('var.less')) {
const customVar = path_1.resolve(this.resourcePath, '..', 'honeycomb-var.less');
if (fs_extra_1.existsSync(customVar)) {
return `${content}\n@import '${customVar}';`;
}
}
if (this.resourcePath.endsWith('index.less')) {
const customStyle = path_1.resolve(this.resourcePath, '..', 'honeycomb.less');
if (fs_extra_1.existsSync(customStyle)) {
return `${content}\n@import '${customStyle}';`;
}
}
return content;
}
exports.default = default_1;