@spark-ui/cli-utils
Advanced tools
Comparing version 2.11.12 to 2.11.13
@@ -6,2 +6,8 @@ # Change Log | ||
## [2.11.13](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@2.11.12...@spark-ui/cli-utils@2.11.13) (2023-07-28) | ||
### Bug Fixes | ||
- fix errors after eslint update ([3dae947](https://github.com/adevinta/spark/commit/3dae947dc169d9db3c7252f54a6224ded335980e)) | ||
## [2.11.12](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@2.11.11...@spark-ui/cli-utils@2.11.12) (2023-07-17) | ||
@@ -8,0 +14,0 @@ |
{ | ||
"name": "@spark-ui/cli-utils", | ||
"version": "2.11.12", | ||
"version": "2.11.13", | ||
"description": "Spark CLI utils", | ||
@@ -36,3 +36,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "c942b38064d568eba43a873f839c2d11bdec1a21" | ||
"gitHead": "dfff441503a7505a9ad35cb676b0a8051056babd" | ||
} |
import { pascalCase } from 'pascal-case' | ||
export default ({ name, description }) => { | ||
export default ({ name }) => { | ||
const componentName = pascalCase(name) | ||
return `import { Meta, StoryFn } from '@storybook/react' | ||
return ` | ||
import { Meta, StoryFn } from '@storybook/react' | ||
import { ${componentName} } from '.' | ||
import { ${componentName} } from '.' | ||
const meta: Meta<typeof ${componentName}> = { | ||
title: 'Components/${componentName}', | ||
component: ${componentName}, | ||
} | ||
const meta: Meta<typeof ${componentName}> = { | ||
title: 'Components/${componentName}', | ||
component: ${componentName}, | ||
} | ||
export default meta | ||
export default meta | ||
export const Default: StoryFn = _args => ( | ||
<${componentName}>Hello World!</${componentName}> | ||
) | ||
` | ||
export const Default: StoryFn = _args => ( | ||
<${componentName}>Hello World!</${componentName}> | ||
) | ||
` | ||
} |
@@ -33,3 +33,3 @@ import path from 'node:path' | ||
'/src/index.ts', | ||
'/src/Bar.styles.tsx', | ||
'/src/Bar.styles.ts', | ||
'/src/Bar.tsx', | ||
@@ -42,2 +42,3 @@ '/vite.config.ts', | ||
] | ||
const assertExpectedFiles = (filePath: string) => { | ||
@@ -44,0 +45,0 @@ expect(response).toContain(`Created ${packagePath}${filePath}`) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
40425
607