@ttianqii/takaui 0.0.8 → 0.0.9

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@ttianqii/takaui",
3
3
  "private": false,
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "type": "module",
6
6
  "main": "./dist/takaui.cjs",
7
7
  "module": "./dist/takaui.js",
@@ -20,6 +20,7 @@
20
20
  "bin": {
21
21
  "takaui-setup": "./src/cli/setup.js"
22
22
  },
23
+ "sideEffects": false,
23
24
  "scripts": {
24
25
  "dev": "vite",
25
26
  "build": "tsc -b && vite build",
package/src/cli/setup.js CHANGED
@@ -77,59 +77,47 @@ try {
77
77
  console.log('⚠️ Could not update Tailwind config:', error.message);
78
78
  }
79
79
 
80
- // 3. Check for CSS import
81
- const possibleEntryPoints = [
82
- 'src/main.tsx',
83
- 'src/main.ts',
84
- 'src/main.jsx',
85
- 'src/main.js',
86
- 'src/index.tsx',
87
- 'src/index.ts',
88
- 'src/index.jsx',
89
- 'src/index.js',
90
- 'src/App.tsx',
91
- 'src/App.ts',
92
- 'src/App.jsx',
93
- 'src/App.js',
80
+ // 3. Check for Tailwind directives in CSS
81
+ const possibleCssFiles = [
82
+ 'src/index.css',
83
+ 'src/styles.css',
84
+ 'src/App.css',
85
+ 'src/global.css',
94
86
  ];
95
87
 
96
- let entryPoint = null;
97
- for (const file of possibleEntryPoints) {
88
+ let cssFile = null;
89
+ for (const file of possibleCssFiles) {
98
90
  if (existsSync(join(cwd, file))) {
99
- entryPoint = file;
91
+ cssFile = file;
100
92
  break;
101
93
  }
102
94
  }
103
95
 
104
- console.log('\n📝 Next Steps:\n');
96
+ console.log('\n📝 Final Steps:\n');
105
97
 
106
- if (entryPoint) {
107
- const entryContent = readFileSync(join(cwd, entryPoint), 'utf-8');
98
+ if (cssFile) {
99
+ const cssContent = readFileSync(join(cwd, cssFile), 'utf-8');
108
100
 
109
- if (entryContent.includes("@ttianqii/takaui/styles.css")) {
110
- console.log(`✅ CSS already imported in ${entryPoint}`);
101
+ if (cssContent.includes('@tailwind base') &&
102
+ cssContent.includes('@tailwind components') &&
103
+ cssContent.includes('@tailwind utilities')) {
104
+ console.log(`✅ Tailwind directives found in ${cssFile}`);
111
105
  } else {
112
- console.log(`Add this import to your ${entryPoint}:`);
113
- console.log(` import '@ttianqii/takaui/styles.css'`);
114
-
115
- // Auto-add if it's a simple case
116
- if (entryContent.includes('import')) {
117
- const lines = entryContent.split('\n');
118
- const lastImportIndex = lines.findLastIndex(line => line.trim().startsWith('import'));
119
-
120
- if (lastImportIndex !== -1) {
121
- lines.splice(lastImportIndex + 1, 0, "import '@ttianqii/takaui/styles.css'");
122
- writeFileSync(join(cwd, entryPoint), lines.join('\n'), 'utf-8');
123
- console.log(` ✅ Auto-added CSS import to ${entryPoint}`);
124
- }
125
- }
106
+ console.log(`⚠️ Add Tailwind directives to ${cssFile}:`);
107
+ console.log(` @tailwind base;`);
108
+ console.log(` @tailwind components;`);
109
+ console.log(` @tailwind utilities;`);
126
110
  }
127
111
  } else {
128
- console.log('Add this import to your main entry file (e.g., main.tsx or App.tsx):');
129
- console.log(" import '@ttianqii/takaui/styles.css'");
112
+ console.log('⚠️ Create a CSS file (e.g., src/index.css) with:');
113
+ console.log(' @tailwind base;');
114
+ console.log(' @tailwind components;');
115
+ console.log(' @tailwind utilities;');
130
116
  }
131
117
 
132
118
  console.log('\n✨ Setup Complete!\n');
119
+ console.log('🎉 TakaUI works like shadcn/ui - no CSS imports needed!');
120
+ console.log(' Just use the components and Tailwind handles the styling.\n');
133
121
  console.log('You can now use TakaUI components:');
134
122
  console.log(" import { DatePicker, DataTable, Calendar } from '@ttianqii/takaui'\n");
135
123
  console.log('📚 Documentation: https://github.com/ttianqii/takaui\n');