@repodog/storybook-config 10.0.8 → 10.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["import { type StorybookConfig } from '@storybook/react-webpack5';\nimport { globSync } from 'glob';\nimport { dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst resolvePath = (name: string): string => fileURLToPath(import.meta.resolve(name));\n\nconst resolveAddOnPath = (packageName: string): string =>\n dirname(fileURLToPath(import.meta.resolve(`${packageName}/package.json`)));\n\nexport type ConfigParams = {\n compiler?: string | [name: string, options: Record<string, unknown>];\n};\n\nexport const config = ({ compiler }: ConfigParams = {}): StorybookConfig => {\n const [name = 'babel', options = {}] = Array.isArray(compiler) ? compiler : [compiler];\n const isCompilerBabel = name === 'babel';\n const isCompilerSwc = name === 'swc';\n console.log(`> Using ${name} compiler`);\n\n return {\n addons: [\n resolveAddOnPath('@storybook/addon-docs'),\n resolveAddOnPath('@storybook/addon-a11y'),\n ...(isCompilerBabel\n ? [\n resolveAddOnPath('@storybook/addon-webpack5-compiler-babel'),\n {\n name: resolveAddOnPath('@storybook/addon-coverage'),\n options: {\n istanbul: {\n exclude: ['.storybook/**', '**/dist/**', '**/node_modules/**'],\n },\n },\n },\n ]\n : []),\n ...(isCompilerSwc ? [resolveAddOnPath('@storybook/addon-webpack5-compiler-swc')] : []),\n {\n name: resolveAddOnPath('@storybook/addon-styling-webpack'),\n options: {\n rules: [\n {\n test: /\\.css$/,\n use: [\n resolvePath('style-loader'),\n {\n loader: resolvePath('css-loader'),\n options: { importLoaders: 1 },\n },\n {\n loader: resolvePath('postcss-loader'),\n },\n ],\n },\n ],\n },\n },\n ],\n core: {\n disableTelemetry: true,\n disableWhatsNewNotifications: true,\n enableCrashReports: false,\n },\n framework: {\n name: resolveAddOnPath('@storybook/react-webpack5'),\n options: {},\n },\n stories: globSync([`../components/**/*.stories.@(js|jsx|ts|tsx)`, '!../**/node_modules/**/*', '!../**/dist/**/*'], {\n cwd: './.storybook',\n }),\n ...(isCompilerBabel && { babel: () => ({ ...options, configFile: false }) }),\n ...(isCompilerSwc && { swc: () => options }),\n };\n};\n"],"names":["resolvePath","name","fileURLToPath","undefined","resolveAddOnPath","packageName","dirname","compiler","options","Array","isArray","isCompilerBabel","isCompilerSwc","console","log","addons","istanbul","exclude","rules","test","use","loader","importLoaders","core","disableTelemetry","disableWhatsNewNotifications","enableCrashReports","framework","stories","globSync","cwd","babel","configFile","swc"],"mappings":"gFAKA,MAAMA,EAAeC,GAAyBC,EAAAA,oBAAcC,GAAoBF,IAE1EG,EAAoBC,GACxBC,EAAAA,QAAQJ,EAAAA,oBAAcC,GAAoB,GAAGE,mCAMzB,EAAGE,YAA2B,MAClD,MAAON,EAAO,QAASO,EAAU,CAAA,GAAMC,MAAMC,QAAQH,GAAYA,EAAW,CAACA,GACvEI,EAA2B,UAATV,EAClBW,EAAyB,QAATX,EAGtB,OAFAY,QAAQC,IAAI,WAAWb,cAEhB,CACLc,OAAQ,CACNX,EAAiB,yBACjBA,EAAiB,4BACbO,EACA,CACEP,EAAiB,4CACjB,CACEH,KAAMG,EAAiB,6BACvBI,QAAS,CACPQ,SAAU,CACRC,QAAS,CAAC,gBAAiB,aAAc,0BAKjD,MACAL,EAAgB,CAACR,EAAiB,2CAA6C,GACnF,CACEH,KAAMG,EAAiB,oCACvBI,QAAS,CACPU,MAAO,CACL,CACEC,KAAM,SACNC,IAAK,CACHpB,EAAY,gBACZ,CACEqB,OAAQrB,EAAY,cACpBQ,QAAS,CAAEc,cAAe,IAE5B,CACED,OAAQrB,EAAY,yBAQlCuB,KAAM,CACJC,kBAAkB,EAClBC,8BAA8B,EAC9BC,oBAAoB,GAEtBC,UAAW,CACT1B,KAAMG,EAAiB,6BACvBI,QAAS,CAAA,GAEXoB,QAASC,EAAAA,SAAS,CAAC,8CAA+C,2BAA4B,oBAAqB,CACjHC,IAAK,oBAEHnB,GAAmB,CAAEoB,MAAO,KAAA,IAAYvB,EAASwB,YAAY,QAC7DpB,GAAiB,CAAEqB,IAAK,IAAMzB"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["import { type StorybookConfig } from '@storybook/react-webpack5';\nimport { globSync } from 'glob';\nimport { dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst resolvePath = (name: string): string => fileURLToPath(import.meta.resolve(name));\n\nconst resolveAddOnPath = (packageName: string): string =>\n dirname(fileURLToPath(import.meta.resolve(`${packageName}/package.json`)));\n\nexport type ConfigParams = {\n compiler?: string | [name: string, options: object];\n};\n\nexport const config = ({ compiler }: ConfigParams = {}): StorybookConfig => {\n const [name = 'babel', options = {}] = Array.isArray(compiler) ? compiler : [compiler];\n const isCompilerBabel = name === 'babel';\n const isCompilerSwc = name === 'swc';\n console.log(`> Using ${name} compiler`);\n\n return {\n addons: [\n resolveAddOnPath('@storybook/addon-docs'),\n resolveAddOnPath('@storybook/addon-a11y'),\n ...(isCompilerBabel\n ? [\n resolveAddOnPath('@storybook/addon-webpack5-compiler-babel'),\n {\n name: resolveAddOnPath('@storybook/addon-coverage'),\n options: {\n istanbul: {\n exclude: ['.storybook/**', '**/dist/**', '**/node_modules/**'],\n },\n },\n },\n ]\n : []),\n ...(isCompilerSwc ? [resolveAddOnPath('@storybook/addon-webpack5-compiler-swc')] : []),\n {\n name: resolveAddOnPath('@storybook/addon-styling-webpack'),\n options: {\n rules: [\n {\n test: /\\.css$/,\n use: [\n resolvePath('style-loader'),\n {\n loader: resolvePath('css-loader'),\n options: { importLoaders: 1 },\n },\n {\n loader: resolvePath('postcss-loader'),\n },\n ],\n },\n ],\n },\n },\n ],\n core: {\n disableTelemetry: true,\n disableWhatsNewNotifications: true,\n enableCrashReports: false,\n },\n framework: {\n name: resolveAddOnPath('@storybook/react-webpack5'),\n options: {},\n },\n stories: globSync([`../components/**/*.stories.@(js|jsx|ts|tsx)`, '!../**/node_modules/**/*', '!../**/dist/**/*'], {\n cwd: './.storybook',\n }),\n ...(isCompilerBabel && { babel: () => ({ ...options, configFile: false }) }),\n ...(isCompilerSwc && { swc: () => options }),\n };\n};\n"],"names":["resolvePath","name","fileURLToPath","undefined","resolveAddOnPath","packageName","dirname","compiler","options","Array","isArray","isCompilerBabel","isCompilerSwc","console","log","addons","istanbul","exclude","rules","test","use","loader","importLoaders","core","disableTelemetry","disableWhatsNewNotifications","enableCrashReports","framework","stories","globSync","cwd","babel","configFile","swc"],"mappings":"gFAKA,MAAMA,EAAeC,GAAyBC,EAAAA,oBAAcC,GAAoBF,IAE1EG,EAAoBC,GACxBC,EAAAA,QAAQJ,EAAAA,oBAAcC,GAAoB,GAAGE,mCAMzB,EAAGE,YAA2B,MAClD,MAAON,EAAO,QAASO,EAAU,CAAA,GAAMC,MAAMC,QAAQH,GAAYA,EAAW,CAACA,GACvEI,EAA2B,UAATV,EAClBW,EAAyB,QAATX,EAGtB,OAFAY,QAAQC,IAAI,WAAWb,cAEhB,CACLc,OAAQ,CACNX,EAAiB,yBACjBA,EAAiB,4BACbO,EACA,CACEP,EAAiB,4CACjB,CACEH,KAAMG,EAAiB,6BACvBI,QAAS,CACPQ,SAAU,CACRC,QAAS,CAAC,gBAAiB,aAAc,0BAKjD,MACAL,EAAgB,CAACR,EAAiB,2CAA6C,GACnF,CACEH,KAAMG,EAAiB,oCACvBI,QAAS,CACPU,MAAO,CACL,CACEC,KAAM,SACNC,IAAK,CACHpB,EAAY,gBACZ,CACEqB,OAAQrB,EAAY,cACpBQ,QAAS,CAAEc,cAAe,IAE5B,CACED,OAAQrB,EAAY,yBAQlCuB,KAAM,CACJC,kBAAkB,EAClBC,8BAA8B,EAC9BC,oBAAoB,GAEtBC,UAAW,CACT1B,KAAMG,EAAiB,6BACvBI,QAAS,CAAA,GAEXoB,QAASC,EAAAA,SAAS,CAAC,8CAA+C,2BAA4B,oBAAqB,CACjHC,IAAK,oBAEHnB,GAAmB,CAAEoB,MAAO,KAAA,IAAYvB,EAASwB,YAAY,QAC7DpB,GAAiB,CAAEqB,IAAK,IAAMzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import { type StorybookConfig } from '@storybook/react-webpack5';\nimport { globSync } from 'glob';\nimport { dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst resolvePath = (name: string): string => fileURLToPath(import.meta.resolve(name));\n\nconst resolveAddOnPath = (packageName: string): string =>\n dirname(fileURLToPath(import.meta.resolve(`${packageName}/package.json`)));\n\nexport type ConfigParams = {\n compiler?: string | [name: string, options: Record<string, unknown>];\n};\n\nexport const config = ({ compiler }: ConfigParams = {}): StorybookConfig => {\n const [name = 'babel', options = {}] = Array.isArray(compiler) ? compiler : [compiler];\n const isCompilerBabel = name === 'babel';\n const isCompilerSwc = name === 'swc';\n console.log(`> Using ${name} compiler`);\n\n return {\n addons: [\n resolveAddOnPath('@storybook/addon-docs'),\n resolveAddOnPath('@storybook/addon-a11y'),\n ...(isCompilerBabel\n ? [\n resolveAddOnPath('@storybook/addon-webpack5-compiler-babel'),\n {\n name: resolveAddOnPath('@storybook/addon-coverage'),\n options: {\n istanbul: {\n exclude: ['.storybook/**', '**/dist/**', '**/node_modules/**'],\n },\n },\n },\n ]\n : []),\n ...(isCompilerSwc ? [resolveAddOnPath('@storybook/addon-webpack5-compiler-swc')] : []),\n {\n name: resolveAddOnPath('@storybook/addon-styling-webpack'),\n options: {\n rules: [\n {\n test: /\\.css$/,\n use: [\n resolvePath('style-loader'),\n {\n loader: resolvePath('css-loader'),\n options: { importLoaders: 1 },\n },\n {\n loader: resolvePath('postcss-loader'),\n },\n ],\n },\n ],\n },\n },\n ],\n core: {\n disableTelemetry: true,\n disableWhatsNewNotifications: true,\n enableCrashReports: false,\n },\n framework: {\n name: resolveAddOnPath('@storybook/react-webpack5'),\n options: {},\n },\n stories: globSync([`../components/**/*.stories.@(js|jsx|ts|tsx)`, '!../**/node_modules/**/*', '!../**/dist/**/*'], {\n cwd: './.storybook',\n }),\n ...(isCompilerBabel && { babel: () => ({ ...options, configFile: false }) }),\n ...(isCompilerSwc && { swc: () => options }),\n };\n};\n"],"names":["resolvePath","name","fileURLToPath","resolve","resolveAddOnPath","packageName","dirname","config","compiler","options","Array","isArray","isCompilerBabel","isCompilerSwc","console","log","addons","istanbul","exclude","rules","test","use","loader","importLoaders","core","disableTelemetry","disableWhatsNewNotifications","enableCrashReports","framework","stories","globSync","cwd","babel","configFile","swc"],"mappings":"6GAKA,MAAMA,EAAeC,GAAyBC,cAA0BC,QAAQF,IAE1EG,EAAoBC,GACxBC,EAAQJ,cAA0BC,QAAQ,GAAGE,oBAMlCE,EAAS,EAAGC,YAA2B,MAClD,MAAOP,EAAO,QAASQ,EAAU,CAAA,GAAMC,MAAMC,QAAQH,GAAYA,EAAW,CAACA,GACvEI,EAA2B,UAATX,EAClBY,EAAyB,QAATZ,EAGtB,OAFAa,QAAQC,IAAI,WAAWd,cAEhB,CACLe,OAAQ,CACNZ,EAAiB,yBACjBA,EAAiB,4BACbQ,EACA,CACER,EAAiB,4CACjB,CACEH,KAAMG,EAAiB,6BACvBK,QAAS,CACPQ,SAAU,CACRC,QAAS,CAAC,gBAAiB,aAAc,0BAKjD,MACAL,EAAgB,CAACT,EAAiB,2CAA6C,GACnF,CACEH,KAAMG,EAAiB,oCACvBK,QAAS,CACPU,MAAO,CACL,CACEC,KAAM,SACNC,IAAK,CACHrB,EAAY,gBACZ,CACEsB,OAAQtB,EAAY,cACpBS,QAAS,CAAEc,cAAe,IAE5B,CACED,OAAQtB,EAAY,yBAQlCwB,KAAM,CACJC,kBAAkB,EAClBC,8BAA8B,EAC9BC,oBAAoB,GAEtBC,UAAW,CACT3B,KAAMG,EAAiB,6BACvBK,QAAS,CAAA,GAEXoB,QAASC,EAAS,CAAC,8CAA+C,2BAA4B,oBAAqB,CACjHC,IAAK,oBAEHnB,GAAmB,CAAEoB,MAAO,KAAA,IAAYvB,EAASwB,YAAY,QAC7DpB,GAAiB,CAAEqB,IAAK,IAAMzB"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import { type StorybookConfig } from '@storybook/react-webpack5';\nimport { globSync } from 'glob';\nimport { dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst resolvePath = (name: string): string => fileURLToPath(import.meta.resolve(name));\n\nconst resolveAddOnPath = (packageName: string): string =>\n dirname(fileURLToPath(import.meta.resolve(`${packageName}/package.json`)));\n\nexport type ConfigParams = {\n compiler?: string | [name: string, options: object];\n};\n\nexport const config = ({ compiler }: ConfigParams = {}): StorybookConfig => {\n const [name = 'babel', options = {}] = Array.isArray(compiler) ? compiler : [compiler];\n const isCompilerBabel = name === 'babel';\n const isCompilerSwc = name === 'swc';\n console.log(`> Using ${name} compiler`);\n\n return {\n addons: [\n resolveAddOnPath('@storybook/addon-docs'),\n resolveAddOnPath('@storybook/addon-a11y'),\n ...(isCompilerBabel\n ? [\n resolveAddOnPath('@storybook/addon-webpack5-compiler-babel'),\n {\n name: resolveAddOnPath('@storybook/addon-coverage'),\n options: {\n istanbul: {\n exclude: ['.storybook/**', '**/dist/**', '**/node_modules/**'],\n },\n },\n },\n ]\n : []),\n ...(isCompilerSwc ? [resolveAddOnPath('@storybook/addon-webpack5-compiler-swc')] : []),\n {\n name: resolveAddOnPath('@storybook/addon-styling-webpack'),\n options: {\n rules: [\n {\n test: /\\.css$/,\n use: [\n resolvePath('style-loader'),\n {\n loader: resolvePath('css-loader'),\n options: { importLoaders: 1 },\n },\n {\n loader: resolvePath('postcss-loader'),\n },\n ],\n },\n ],\n },\n },\n ],\n core: {\n disableTelemetry: true,\n disableWhatsNewNotifications: true,\n enableCrashReports: false,\n },\n framework: {\n name: resolveAddOnPath('@storybook/react-webpack5'),\n options: {},\n },\n stories: globSync([`../components/**/*.stories.@(js|jsx|ts|tsx)`, '!../**/node_modules/**/*', '!../**/dist/**/*'], {\n cwd: './.storybook',\n }),\n ...(isCompilerBabel && { babel: () => ({ ...options, configFile: false }) }),\n ...(isCompilerSwc && { swc: () => options }),\n };\n};\n"],"names":["resolvePath","name","fileURLToPath","resolve","resolveAddOnPath","packageName","dirname","config","compiler","options","Array","isArray","isCompilerBabel","isCompilerSwc","console","log","addons","istanbul","exclude","rules","test","use","loader","importLoaders","core","disableTelemetry","disableWhatsNewNotifications","enableCrashReports","framework","stories","globSync","cwd","babel","configFile","swc"],"mappings":"6GAKA,MAAMA,EAAeC,GAAyBC,cAA0BC,QAAQF,IAE1EG,EAAoBC,GACxBC,EAAQJ,cAA0BC,QAAQ,GAAGE,oBAMlCE,EAAS,EAAGC,YAA2B,MAClD,MAAOP,EAAO,QAASQ,EAAU,CAAA,GAAMC,MAAMC,QAAQH,GAAYA,EAAW,CAACA,GACvEI,EAA2B,UAATX,EAClBY,EAAyB,QAATZ,EAGtB,OAFAa,QAAQC,IAAI,WAAWd,cAEhB,CACLe,OAAQ,CACNZ,EAAiB,yBACjBA,EAAiB,4BACbQ,EACA,CACER,EAAiB,4CACjB,CACEH,KAAMG,EAAiB,6BACvBK,QAAS,CACPQ,SAAU,CACRC,QAAS,CAAC,gBAAiB,aAAc,0BAKjD,MACAL,EAAgB,CAACT,EAAiB,2CAA6C,GACnF,CACEH,KAAMG,EAAiB,oCACvBK,QAAS,CACPU,MAAO,CACL,CACEC,KAAM,SACNC,IAAK,CACHrB,EAAY,gBACZ,CACEsB,OAAQtB,EAAY,cACpBS,QAAS,CAAEc,cAAe,IAE5B,CACED,OAAQtB,EAAY,yBAQlCwB,KAAM,CACJC,kBAAkB,EAClBC,8BAA8B,EAC9BC,oBAAoB,GAEtBC,UAAW,CACT3B,KAAMG,EAAiB,6BACvBK,QAAS,CAAA,GAEXoB,QAASC,EAAS,CAAC,8CAA+C,2BAA4B,oBAAqB,CACjHC,IAAK,oBAEHnB,GAAmB,CAAEoB,MAAO,KAAA,IAAYvB,EAASwB,YAAY,QAC7DpB,GAAiB,CAAEqB,IAAK,IAAMzB"}
@@ -1,6 +1,6 @@
1
1
  import { type StorybookConfig } from '@storybook/react-webpack5';
2
2
  export type ConfigParams = {
3
- compiler?: string | [name: string, options: Record<string, unknown>];
3
+ compiler?: string | [name: string, options: object];
4
4
  };
5
5
  export declare const config: ({ compiler }?: ConfigParams) => StorybookConfig;
6
6
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/index.cts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAUjE,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,eAAc,YAAiB,KAAG,eA4DxD,CAAC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/index.cts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAUjE,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,eAAc,YAAiB,KAAG,eA4DxD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type StorybookConfig } from '@storybook/react-webpack5';
2
2
  export type ConfigParams = {
3
- compiler?: string | [name: string, options: Record<string, unknown>];
3
+ compiler?: string | [name: string, options: object];
4
4
  };
5
5
  export declare const config: ({ compiler }?: ConfigParams) => StorybookConfig;
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAUjE,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,eAAc,YAAiB,KAAG,eA4DxD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAUjE,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,eAAc,YAAiB,KAAG,eA4DxD,CAAC"}