ant-design-blazor/scripts/build-config.ts
James Yeung 1659aef02d
chore: sync ant-design v4.20.7 (#2497)
* 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
2022-06-04 00:44:34 +08:00

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;