@charcoal-ui/icons-cli 4.8.0 → 4.8.1-beta.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charcoal-ui/icons-cli",
3
- "version": "4.8.0",
3
+ "version": "4.8.1-beta.0",
4
4
  "license": "Apache-2.0",
5
5
  "bin": "./dist/index.js",
6
6
  "devDependencies": {
@@ -28,13 +28,23 @@ async function main() {
28
28
  })
29
29
  )
30
30
  const icons = Object.entries(catalog)
31
+
32
+ const iconsPair = icons.map(([iconName, iconPath]) => [
33
+ iconName,
34
+ './' + iconPath.replace('.tsx', ''),
35
+ ])
36
+
37
+ await writeFile(
38
+ path.join(workDir, 'index.tsx'),
39
+ `${iconsPair
40
+ .map(([iconName, iconPath]) => `export {${iconName}} from '${iconPath}'`)
41
+ .join('\n')}`
42
+ )
43
+
31
44
  await writeFile(
32
45
  path.join(workDir, 'index.story.tsx'),
33
- `${icons
34
- .map(
35
- ([iconName, iconPath]) =>
36
- `import {${iconName}} from './${iconPath.replace('.tsx', '')}'`
37
- )
46
+ `${iconsPair
47
+ .map(([iconName, iconPath]) => `import {${iconName}} from '${iconPath}'`)
38
48
  .join('\n')}
39
49
  import { createGlobalStyle } from 'styled-components'
40
50