mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 05:27:37 +08:00
1659aef02d
* chore: sync ant-design v4.20.7 * fix style build * clean the style * fix dropdown overlay * remove cdk styles * fix dropdown overwrite styles * fix doc styles
34 lines
867 B
TypeScript
34 lines
867 B
TypeScript
/**
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://github.com/ant-design-blazor/ant-design-blazor/blob/master/LICENSE
|
|
*/
|
|
|
|
import { existsSync } from 'fs';
|
|
import { dirname, join, resolve } from 'path';
|
|
|
|
export interface BuildConfig {
|
|
projectVersion: string;
|
|
projectDir: string;
|
|
componentsDir: string;
|
|
scriptsDir: string;
|
|
outputDir: string;
|
|
publishDir: string;
|
|
libDir: string;
|
|
}
|
|
|
|
const BUILD_CONFIG_FILENAME = 'build-config.js';
|
|
|
|
export function findBuildConfig(): string {
|
|
let currentDir = process.cwd();
|
|
|
|
while (!existsSync(resolve(currentDir, BUILD_CONFIG_FILENAME))) {
|
|
currentDir = dirname(currentDir);
|
|
}
|
|
|
|
return join(currentDir, BUILD_CONFIG_FILENAME);
|
|
}
|
|
|
|
const buildConfigPath = findBuildConfig();
|
|
|
|
export const buildConfig = require(buildConfigPath) as BuildConfig;
|