@takuma-ru/auto-story-generator
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -587,6 +587,16 @@ var __defProp = Object.defineProperty; | ||
return consola4.error("Could not find argTypes"); | ||
const defaultExportDeclaration = sourceFile.getExportedDeclarations(); | ||
let isDefaultExportComponent = false; | ||
defaultExportDeclaration.forEach((declaration, exportName) => { | ||
var _a; | ||
if (exportName === "default") { | ||
const defaultExportName = (_a = declaration[0].getSymbol()) == null ? void 0 : _a.getName(); | ||
isDefaultExportComponent = defaultExportName === pascalComponentName; | ||
return; | ||
} | ||
}); | ||
const initialCode = ` | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { ${pascalComponentName} } from "./${fileName}"; | ||
${isDefaultExportComponent ? `import ${pascalComponentName} from "./${fileName}";` : `import { ${pascalComponentName} } from "./${fileName}";`} | ||
@@ -593,0 +603,0 @@ const meta: Meta<typeof ${pascalComponentName}> = { |
{ | ||
"name": "@takuma-ru/auto-story-generator", | ||
"description": "Automatic real-time story file generation from React, Vue, Angular and Lit component files", | ||
"private": false, | ||
"version": "0.2.2", | ||
"description": "", | ||
"version": "0.2.3", | ||
"main": "./dist/index.js", | ||
@@ -7,0 +7,0 @@ "module": "./dist/index.js", |
@@ -6,3 +6,3 @@ # @takuma-ru/auto-story-generator | ||
## Description | ||
Automatic real-time story file generation from React, Vue, and Lit component files | ||
Automatic real-time story file generation from React, Vue, Angular and Lit component files | ||
@@ -9,0 +9,0 @@ ## Getting Started |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55645
1660