@machinemetrics/mm-react-components 0.2.3-11 → 0.2.3-13
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/dist/scripts/init.cjs +11 -3
- package/dist/scripts/npx-init.cjs +13 -4
- package/package.json +1 -1
package/dist/scripts/init.cjs
CHANGED
|
@@ -157,12 +157,20 @@ ${cssContent}`;
|
|
|
157
157
|
'bin',
|
|
158
158
|
'chakra-to-shadcn.js',
|
|
159
159
|
);
|
|
160
|
+
const migrationConfigPath = path.join(
|
|
161
|
+
__dirname,
|
|
162
|
+
'chakra-to-shadcn-migrator',
|
|
163
|
+
'chakra-to-shadcn.config.json',
|
|
164
|
+
);
|
|
160
165
|
|
|
161
166
|
if (fs.existsSync(migrationScriptPath)) {
|
|
162
167
|
try {
|
|
163
|
-
execSync(
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
execSync(
|
|
169
|
+
`node "${migrationScriptPath}" --config "${migrationConfigPath}" --apply`,
|
|
170
|
+
{
|
|
171
|
+
stdio: 'inherit',
|
|
172
|
+
},
|
|
173
|
+
);
|
|
166
174
|
log('\n✅ Chakra UI migration complete!', 'green');
|
|
167
175
|
} catch (error) {
|
|
168
176
|
log('\n⚠️ Migration encountered issues', 'yellow');
|
|
@@ -15,7 +15,8 @@ const path = require('path');
|
|
|
15
15
|
const readline = require('readline');
|
|
16
16
|
|
|
17
17
|
// Read the version from package.json
|
|
18
|
-
|
|
18
|
+
// When built, this script is at dist/scripts/npx-init.cjs, so go up two levels
|
|
19
|
+
const packageJsonPath = path.join(__dirname, '..', '..', 'package.json');
|
|
19
20
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
20
21
|
const version = packageJson.version;
|
|
21
22
|
|
|
@@ -358,12 +359,20 @@ document.documentElement.classList.add('carbide');
|
|
|
358
359
|
'bin',
|
|
359
360
|
'chakra-to-shadcn.js',
|
|
360
361
|
);
|
|
362
|
+
const migrationConfigPath = path.join(
|
|
363
|
+
__dirname,
|
|
364
|
+
'chakra-to-shadcn-migrator',
|
|
365
|
+
'chakra-to-shadcn.config.json',
|
|
366
|
+
);
|
|
361
367
|
|
|
362
368
|
if (fs.existsSync(migrationScriptPath)) {
|
|
363
369
|
try {
|
|
364
|
-
execSync(
|
|
365
|
-
|
|
366
|
-
|
|
370
|
+
execSync(
|
|
371
|
+
`node "${migrationScriptPath}" --config "${migrationConfigPath}" --apply`,
|
|
372
|
+
{
|
|
373
|
+
stdio: 'inherit',
|
|
374
|
+
},
|
|
375
|
+
);
|
|
367
376
|
log('\n✅ Chakra UI migration complete!', 'green');
|
|
368
377
|
} catch (error) {
|
|
369
378
|
log('\n⚠️ Migration encountered issues', 'yellow');
|