import { Config as StencilConfig } from '@stencil/core'; import { OutputTargetDistCustomElements, OutputTargetDistCustomElementsBundle } from '@stencil/core/internal'; import type { Config as JestConfig } from '@jest/types'; import { OutputTargetReact } from '@stencil/react-output-target'; import { OutputTargetVue } from '@stencil/vue-output-target'; import { OdsStencilConfigEnvOptions } from './ods-stencil-config-env-options'; /** * get the stencil configuration. * the base theme `@ovhcloud/ods-theme-blue-jeans/index.scss` will be automatically added if you are in dev or testing mode, * in order to have a normal UI, just like in an application that have an imported theme. * the `tsconfig.prod.json` file will be used only if you are in `dev` or `prod` mode. * * - the `dev` mode is defined as you use the `serve` or `watch` option of stencil. * - the `prod` mode is defined when you want to compile for production purpose. * - the `test` mode is defined as you are testing the component (unit test, e2e, screenshot). * * @example * ``` * import { Config } from '@stencil/core'; * import { getStencilConfig } from '@ovhcloud/ods-stencil/libraries/stencil-core'; * import * as jestConfig from './jest.config'; * * const args = process.argv.slice(2); * * export const config: Config = getStencilConfig({ * namespace: 'osds-my-components-package', * args, * jestConfig: jestConfig.default * }); * ``` * * If you have not set a copy task list in `distCustomElements` or `distCustomElementsBundle`, * it adds one in order to copy a `package.json` file into the generated `custom-elements` and * `custom-elements-bundle` directories (allow use these directories as packages). * If you have set a copy task list, so you must set yourself the copy of `package.json` like * ``` * export const config: Config = getStencilConfig({ * namespace: 'osds-my-components-package', * args, * jestConfig: jestConfig.default, * distCustomElements: { * copy: [ * { * src: '../../../scripts/custom-elements', * dest: 'custom-elements', * warn: true, * }, * myTask * ] * }, * // do the same for bundle: * // distCustomElementsBundle: ... * }); * ``` * * WARNING: if your app have some issue with vueJs and Vite, you may need to use the custom-elements-bundle compiled files * and not the loader at disposal (see https://github.com/ionic-team/stencil/pull/2959). * * @param namespace - components package name * @param args - array of argument from stencil like `--spec`, `--ci` etc * @param jestConfig - jest config options * @param distCustomElements - recommended target for custom elements. see https://stenciljs.com/docs/custom-elements * @param distCustomElementsBundle - deprecated target for custom elements. see https://stenciljs.com/docs/custom-elements-bundle * @param reactOutput - config for react proxies * @param vueOutput - config for vue proxies * @param dev - dev specific options to set * @param prod - production specific options to set * @param test - testing specific options to set */ export declare function getStencilConfig({ namespace, args, jestConfig, distCustomElements, distCustomElementsBundle, reactOutput, vueOutput, dev, prod, test, }: { namespace: string; args: string[]; /** testing config for jest */ jestConfig?: JestConfig.InitialOptions; distCustomElements?: OutputTargetDistCustomElements; /** @deprecated prefer using `distCustomElements` (will be deleted in a next major version) */ distCustomElementsBundle?: OutputTargetDistCustomElementsBundle; reactOutput?: Partial; vueOutput?: Partial; dev?: OdsStencilConfigEnvOptions; prod?: OdsStencilConfigEnvOptions; test?: OdsStencilConfigEnvOptions; }): StencilConfig;