[kbn/ui-shared-deps] load base css file (#58520)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Spencer 2020-02-26 08:25:03 -07:00 committed by GitHub
parent 8524303b6e
commit 457783e839
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 2 deletions

View file

@ -27,6 +27,11 @@ export const distDir: string;
*/
export const distFilename: string;
/**
* Filename of the unthemed css file in the distributable directory
*/
export const baseCssDistFilename: string;
/**
* Filename of the dark-theme css file in the distributable directory
*/

View file

@ -21,6 +21,7 @@ const Path = require('path');
exports.distDir = Path.resolve(__dirname, 'target');
exports.distFilename = 'kbn-ui-shared-deps.js';
exports.baseCssDistFilename = 'kbn-ui-shared-deps.css';
exports.lightCssDistFilename = 'kbn-ui-shared-deps.light.css';
exports.darkCssDistFilename = 'kbn-ui-shared-deps.dark.css';
exports.externals = {

View file

@ -64,8 +64,11 @@ run(
});
compiler.hooks.watchRun.tap('report on start', () => {
process.stdout.cursorTo(0, 0);
process.stdout.clearScreenDown();
if (process.stdout.isTTY) {
process.stdout.cursorTo(0, 0);
process.stdout.clearScreenDown();
}
log.info('Running webpack compilation...');
});

View file

@ -112,6 +112,7 @@ export function uiRenderMixin(kbnServer, server, config) {
);
const styleSheetPaths = [
...dllStyleChunks,
`${basePath}/bundles/kbn-ui-shared-deps/${UiSharedDeps.baseCssDistFilename}`,
...(darkMode
? [
`${basePath}/bundles/kbn-ui-shared-deps/${UiSharedDeps.darkCssDistFilename}`,

View file

@ -64,6 +64,7 @@ module.exports = function(grunt) {
? `http://localhost:5610/bundles/tests.bundle.js`
: `http://localhost:5610/bundles/tests.bundle.js?shards=${TOTAL_CI_SHARDS}&shard_num=${shardNum}`,
`http://localhost:5610/bundles/kbn-ui-shared-deps/${UiSharedDeps.baseCssDistFilename}`,
// this causes tilemap tests to fail, probably because the eui styles haven't been
// included in the karma harness a long some time, if ever
// `http://localhost:5610/bundles/kbn-ui-shared-deps/${UiSharedDeps.lightCssDistFilename}`,