@itcase/storybook-config 1.1.56 → 1.1.57

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.
@@ -6,21 +6,28 @@ const SOURCE_LINK = {
6
6
  before: { href: '', icon: '', label: '', order: 0 },
7
7
  'component-vscode': ({ importPath, rootPath }) => {
8
8
  if (!rootPath) return undefined
9
- const componentPath = importPath.replace(/\.stories\.(js|tsx)?$/, '.js')
10
9
  const labelPath =
11
10
  'Source — ' + importPath.replace(/\.stories\.(js|tsx)?$/, '')
12
- const componentFileUrl = getFileUrl(rootPath, componentPath)
13
- const href = `vscode://${componentFileUrl.href}`
14
- return { href: href, icon: 'VSCodeIcon', label: labelPath }
11
+ const href = `vscode://${
12
+ getFileUrl(rootPath, importPath.replace(/\.stories\.(js|tsx)?$/, '.js'))
13
+ .href
14
+ }`
15
+ const icon = 'VSCodeIcon'
16
+ return { label: labelPath, href: href, icon: icon }
15
17
  },
16
18
  'story-vscode': ({ importPath, rootPath }) => {
17
19
  if (!rootPath) return undefined
18
- const fileUrl = getFileUrl(rootPath, importPath)
20
+
19
21
  const labelPath = 'Story — ' + importPath.replace(/\.(js|tsx)?$/, '')
20
- const href = `vscode://${fileUrl.href}`
21
- return { href: href, icon: 'StorybookIcon', label: labelPath }
22
+ const href = `vscode://${getFileUrl(rootPath, importPath).href}`
23
+ const icon = 'StorybookIcon'
24
+ return {
25
+ label: labelPath,
26
+ href: href,
27
+ icon: icon,
28
+ }
22
29
  },
23
- 'addon-powered-by': { href: '', icon: '', label: '', order: 1000 },
30
+ 'addon-powered-by': { label: '', href: '', icon: '', order: 1000 },
24
31
  },
25
32
  }
26
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/storybook-config",
3
- "version": "1.1.56",
3
+ "version": "1.1.57",
4
4
  "author": "ITCase",
5
5
  "description": "Code style linter configuration presets",
6
6
  "engines": {