@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/README.md +31 -14
- package/dist/takaui.cjs +16 -16
- package/dist/takaui.js +4255 -4569
- package/package.json +2 -1
- package/src/cli/setup.js +26 -38
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttianqii/takaui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
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
|
|
81
|
-
const
|
|
82
|
-
'src/
|
|
83
|
-
'src/
|
|
84
|
-
'src/
|
|
85
|
-
'src/
|
|
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
|
|
97
|
-
for (const file of
|
|
88
|
+
let cssFile = null;
|
|
89
|
+
for (const file of possibleCssFiles) {
|
|
98
90
|
if (existsSync(join(cwd, file))) {
|
|
99
|
-
|
|
91
|
+
cssFile = file;
|
|
100
92
|
break;
|
|
101
93
|
}
|
|
102
94
|
}
|
|
103
95
|
|
|
104
|
-
console.log('\n📝
|
|
96
|
+
console.log('\n📝 Final Steps:\n');
|
|
105
97
|
|
|
106
|
-
if (
|
|
107
|
-
const
|
|
98
|
+
if (cssFile) {
|
|
99
|
+
const cssContent = readFileSync(join(cwd, cssFile), 'utf-8');
|
|
108
100
|
|
|
109
|
-
if (
|
|
110
|
-
|
|
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(
|
|
113
|
-
console.log(`
|
|
114
|
-
|
|
115
|
-
|
|
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('
|
|
129
|
-
console.log(
|
|
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');
|