chore(cli): rename some files

This commit is contained in:
陈嘉涵
2019-11-29 14:17:40 +08:00
parent afc6113938
commit 736bac00b9
14 changed files with 102 additions and 141 deletions

View File

@@ -9,21 +9,22 @@ import {
STYPE_DEPS_JSON_FILE
} from '../common/constant';
// eslint-disable-next-line
const styleDepsJson = require(STYPE_DEPS_JSON_FILE);
function getStyleExt(): string {
export function getStyleExt(): string {
const preprocessor = get(CONFIG, 'build.css.preprocessor', 'less');
if (preprocessor === 'sass') {
return '.scss';
return 'scss';
}
return `.${preprocessor}`;
return preprocessor;
}
export function genPacakgeStyle() {
const ext = getStyleExt();
// eslint-disable-next-line
const styleDepsJson = require(STYPE_DEPS_JSON_FILE);
const ext = '.' + getStyleExt();
const content = styleDepsJson.sequence
.map((name: string) => `@import "${join(SRC_DIR, `${name}/index${ext}`)}";`)
.join('\n');