From 518d6436812ea248cb6795ea1e73f923bd6e23e5 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 31 Oct 2023 11:13:32 +0100 Subject: [PATCH] corrections --- code/renderers/vue/preset.js | 1 + code/renderers/vue/preset.ts | 12 ------------ code/renderers/vue3/preset.js | 1 + code/renderers/vue3/preset.ts | 12 ------------ 4 files changed, 2 insertions(+), 24 deletions(-) create mode 100644 code/renderers/vue/preset.js delete mode 100644 code/renderers/vue/preset.ts create mode 100644 code/renderers/vue3/preset.js delete mode 100644 code/renderers/vue3/preset.ts diff --git a/code/renderers/vue/preset.js b/code/renderers/vue/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/renderers/vue/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/renderers/vue/preset.ts b/code/renderers/vue/preset.ts deleted file mode 100644 index 7cb30b002039..000000000000 --- a/code/renderers/vue/preset.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { StorybookConfig } from '@storybook/types'; -import { join } from 'path'; - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = async (input, options) => { - const docsEnabled = Object.keys(await options.presets.apply('docs', {}, options)).length > 0; - const result: string[] = []; - - return result - .concat(input) - .concat([join(__dirname, 'preview.mjs')]) - .concat(docsEnabled ? [join(__dirname, 'preview-docs.mjs')] : []); -}; diff --git a/code/renderers/vue3/preset.js b/code/renderers/vue3/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/renderers/vue3/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/renderers/vue3/preset.ts b/code/renderers/vue3/preset.ts deleted file mode 100644 index 7cb30b002039..000000000000 --- a/code/renderers/vue3/preset.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { StorybookConfig } from '@storybook/types'; -import { join } from 'path'; - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = async (input, options) => { - const docsEnabled = Object.keys(await options.presets.apply('docs', {}, options)).length > 0; - const result: string[] = []; - - return result - .concat(input) - .concat([join(__dirname, 'preview.mjs')]) - .concat(docsEnabled ? [join(__dirname, 'preview-docs.mjs')] : []); -};