diff --git a/src/dev/storybook/commands/clean.ts b/src/dev/storybook/commands/clean.ts index 2080154ba88f6..328c4d9e2c23c 100644 --- a/src/dev/storybook/commands/clean.ts +++ b/src/dev/storybook/commands/clean.ts @@ -18,13 +18,14 @@ */ import { ToolingLog } from '@kbn/dev-utils'; +import { REPO_ROOT } from '@kbn/dev-utils'; import { join } from 'path'; import del from 'del'; -export const clean = async ({ log, rootDir }: { log: ToolingLog; rootDir: string }) => { +export const clean = async ({ log }: { log: ToolingLog }) => { log.info('Cleaning Storybook build folder'); - const dir = join(rootDir, 'built_assets', 'storybook'); + const dir = join(REPO_ROOT, 'built_assets', 'storybook'); log.info('Deleting folder:', dir); await del([join(dir, '*')]); await del([dir]); diff --git a/src/dev/storybook/run_storybook_cli.ts b/src/dev/storybook/run_storybook_cli.ts index bc98157cf0f67..0f7dc40ceef0b 100644 --- a/src/dev/storybook/run_storybook_cli.ts +++ b/src/dev/storybook/run_storybook_cli.ts @@ -19,11 +19,10 @@ import { join } from 'path'; import { run, createFlagError } from '@kbn/dev-utils'; +import { REPO_ROOT } from '@kbn/dev-utils'; import { storybookAliases } from './aliases'; import { clean } from './commands/clean'; -const rootDir = join(__dirname, '..', '..', '..'); - run( async params => { const { flags, log } = params; @@ -32,11 +31,11 @@ run( } = flags; if (flags.verbose) { - log.info('Flags:', flags); + log.verbose('Flags:', flags); } if (flags.clean) { - await clean({ log, rootDir }); + await clean({ log }); return; } @@ -49,9 +48,9 @@ run( } const relative = (storybookAliases as any)[alias]; - const absolute = join(rootDir, relative); + const absolute = join(REPO_ROOT, relative); - log.info('Loading Storybook:', absolute); + log.verbose('Loading Storybook:', absolute); process.chdir(join(absolute, '..', '..')); require(absolute); }, diff --git a/x-pack/legacy/plugins/canvas/public/components/color_manager/color_manager.tsx b/x-pack/legacy/plugins/canvas/public/components/color_manager/color_manager.tsx index 619ac6627fba7..c9db9a9ba3468 100644 --- a/x-pack/legacy/plugins/canvas/public/components/color_manager/color_manager.tsx +++ b/x-pack/legacy/plugins/canvas/public/components/color_manager/color_manager.tsx @@ -74,7 +74,7 @@ export const ColorManager: FunctionComponent = ({ 0} - placeholder={'strings.getCodePlaceholder()'} + placeholder={strings.getCodePlaceholder()} onChange={e => onChange(e.target.value)} />