Skip to content

Commit

Permalink
[dev/build/sass] build stylesheets for disabled plugins too (#54654)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer authored Jan 13, 2020
1 parent 6f54c06 commit 5e60711
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/dev/sass/build_sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import { resolve } from 'path';

import * as Rx from 'rxjs';
import { toArray } from 'rxjs/operators';

import { createFailError } from '@kbn/dev-utils';
Expand Down Expand Up @@ -61,9 +62,11 @@ export async function buildSass({ log, kibanaDir, watch }) {

const scanDirs = [resolve(kibanaDir, 'src/legacy/core_plugins')];
const paths = [resolve(kibanaDir, 'x-pack')];
const { spec$ } = findPluginSpecs({ plugins: { scanDirs, paths } });
const enabledPlugins = await spec$.pipe(toArray()).toPromise();
const uiExports = collectUiExports(enabledPlugins);
const { spec$, disabledSpec$ } = findPluginSpecs({ plugins: { scanDirs, paths } });
const allPlugins = await Rx.merge(spec$, disabledSpec$)
.pipe(toArray())
.toPromise();
const uiExports = collectUiExports(allPlugins);
const { styleSheetPaths } = uiExports;

log.info('%s %d styleSheetPaths', watch ? 'watching' : 'found', styleSheetPaths.length);
Expand Down

0 comments on commit 5e60711

Please sign in to comment.