@catchdrift/cli 0.1.17 → 0.1.18

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": "@catchdrift/cli",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "CLI for Drift — install, check, and manage design system coverage for any React app.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -59,15 +59,34 @@ const dsPackages = pkgMatch
59
59
  : []
60
60
 
61
61
  if (dsPackages.length === 0) {
62
- console.log(`
63
- [drift-sync] No dsPackages found in config.ts.
62
+ // Check if the user has a Figma or Storybook setup instead
63
+ const hasFigma = configSrc.includes('figmaFileKey') || configSrc.includes('figmaFiles')
64
+ const hasStorybook = configSrc.includes('storybookUrl')
65
+
66
+ if (hasFigma || hasStorybook) {
67
+ console.log(`
68
+ [drift-sync] Your DS is connected via ${[hasFigma && 'Figma', hasStorybook && 'Storybook'].filter(Boolean).join(' + ')}, not an npm package.
69
+
70
+ To populate your component registry:
71
+ ${hasFigma ? ' Figma: open Claude Code and run /drift-sync figma' : ''}
72
+ ${hasStorybook ? ' Storybook: make sure Storybook is running, then re-run npx catchdrift sync --storybook' : ''}
64
73
 
65
- Add this to src/ds-coverage/config.ts:
74
+ catchdrift sync (this command) is for scanning imports from a DS npm package.
75
+ To use it, add dsPackages to drift.config.ts:
66
76
 
67
77
  dsPackages: ['@your/component-library'],
78
+ `.trim())
79
+ } else {
80
+ console.log(`
81
+ [drift-sync] No dsPackages found in drift.config.ts.
68
82
 
69
- Then run npm run drift-sync again.
70
- `.trim())
83
+ Add this to drift.config.ts:
84
+
85
+ dsPackages: ['@your/component-library'],
86
+
87
+ Then run npx catchdrift sync again.
88
+ `.trim())
89
+ }
71
90
  process.exit(0)
72
91
  }
73
92