diff --git a/x-pack/plugins/canvas/.storybook/config.js b/x-pack/plugins/canvas/.storybook/config.js index 9eb3de8fbae27a..c808a672711aba 100644 --- a/x-pack/plugins/canvas/.storybook/config.js +++ b/x-pack/plugins/canvas/.storybook/config.js @@ -50,7 +50,7 @@ function loadStories() { // Only gather and require CSS files related to Canvas. The other CSS files // are built into the DLL. const css = require.context( - '../../../../../built_assets/css', + '../../../../built_assets/css', true, /plugins\/(?=canvas).*light\.css/ ); diff --git a/x-pack/plugins/canvas/.storybook/constants.js b/x-pack/plugins/canvas/.storybook/constants.js index 9b59afbaf69f20..258bf208ed8774 100644 --- a/x-pack/plugins/canvas/.storybook/constants.js +++ b/x-pack/plugins/canvas/.storybook/constants.js @@ -7,7 +7,7 @@ const path = require('path'); const DLL_NAME = 'canvas_storybook_dll'; -const KIBANA_ROOT = path.resolve(__dirname, '../../../../..'); +const KIBANA_ROOT = path.resolve(__dirname, '../../../..'); const BUILT_ASSETS = path.resolve(KIBANA_ROOT, 'built_assets'); const DLL_OUTPUT = path.resolve(BUILT_ASSETS, DLL_NAME); diff --git a/x-pack/plugins/canvas/.storybook/dll_contexts.js b/x-pack/plugins/canvas/.storybook/dll_contexts.js index 273323d065ecf6..529fd8aa5c7914 100644 --- a/x-pack/plugins/canvas/.storybook/dll_contexts.js +++ b/x-pack/plugins/canvas/.storybook/dll_contexts.js @@ -11,7 +11,7 @@ // Pull in the built CSS produced by the Kibana server, but not // the Canvas CSS-- we want that in the HMR service. const css = require.context( - '../../../../../built_assets/css', + '../../../../built_assets/css', true, /\.\/plugins\/(?!canvas).*light\.css/ ); @@ -21,15 +21,11 @@ css.keys().forEach(filename => { // Include Legacy styles const uiStyles = require.context( - '../../../../../src/legacy/ui/public/styles', + '../../../../src/legacy/ui/public/styles', false, /[\/\\](?!mixins|variables|_|\.|bootstrap_(light|dark))[^\/\\]+\.less/ ); uiStyles.keys().forEach(key => uiStyles(key)); -const json = require.context( - '../shareable_runtime/test/workpads', - false, - /\.json$/ -); +const json = require.context('../shareable_runtime/test/workpads', false, /\.json$/); json.keys().forEach(key => json(key)); diff --git a/x-pack/plugins/canvas/scripts/storybook.js b/x-pack/plugins/canvas/scripts/storybook.js index 0577bbca71fd5e..c9e6c6c65436c2 100644 --- a/x-pack/plugins/canvas/scripts/storybook.js +++ b/x-pack/plugins/canvas/scripts/storybook.js @@ -37,7 +37,7 @@ run( // Ensure SASS dependencies have been built before doing anything. execa.sync(process.execPath, ['scripts/build_sass'], { - cwd: path.resolve(__dirname, '../../../../..'), + cwd: path.resolve(__dirname, '../../../..'), ...options, }); @@ -58,7 +58,7 @@ run( 'false', ], { - cwd: path.resolve(__dirname, '../../../../..'), + cwd: path.resolve(__dirname, '../../../..'), stdio: ['ignore', 'inherit', 'inherit'], buffer: false, } @@ -96,7 +96,7 @@ run( // Watch the SASS sheets for changes execa(process.execPath, ['scripts/build_sass', '--watch'], { - cwd: path.resolve(__dirname, '../../../../..'), + cwd: path.resolve(__dirname, '../../../..'), ...options, }); diff --git a/x-pack/plugins/canvas/shareable_runtime/constants.js b/x-pack/plugins/canvas/shareable_runtime/constants.js index b1292619d575cd..98abc7ca5a95fa 100644 --- a/x-pack/plugins/canvas/shareable_runtime/constants.js +++ b/x-pack/plugins/canvas/shareable_runtime/constants.js @@ -7,7 +7,7 @@ const path = require('path'); const { LIBRARY_NAME, SHAREABLE_RUNTIME_NAME } = require('./constants_static'); -const KIBANA_ROOT_PATH = '../../../../..'; +const KIBANA_ROOT_PATH = '../../../..'; const CANVAS_ROOT_PATH = 'x-pack/plugins/canvas'; const SHAREABLE_RUNTIME_PATH = 'shareable_runtime'; const SHAREABLE_RUNTIME_OUTPUT_PATH = 'shareable_runtime/build'; diff --git a/x-pack/plugins/canvas/shareable_runtime/index.ts b/x-pack/plugins/canvas/shareable_runtime/index.ts index 2398a348f5a31d..8b29b23c4442fe 100644 --- a/x-pack/plugins/canvas/shareable_runtime/index.ts +++ b/x-pack/plugins/canvas/shareable_runtime/index.ts @@ -5,13 +5,13 @@ */ export * from './api'; -import '../../../../../built_assets/css/plugins/kibana/index.light.css'; +import '../../../../built_assets/css/plugins/kibana/index.light.css'; import '../public/style/index.scss'; import '@elastic/eui/dist/eui_theme_light.css'; import '@kbn/ui-framework/dist/kui_light.css'; const css = require.context( - '../../../../../built_assets/css', + '../../../../built_assets/css', true, /\.\/plugins\/(?!canvas).*light\.css/ ); @@ -20,7 +20,7 @@ css.keys().forEach(filename => { }); const uiStyles = require.context( - '../../../../../src/legacy/ui/public/styles', + '../../../../src/legacy/ui/public/styles', false, /[\/\\](?!mixins|variables|_|\.|bootstrap_(light|dark))[^\/\\]+\.less/ );