File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node --no-warnings
22
3+ import process from 'node:process'
4+ // eslint-disable-next-line antfu/no-import-dist
35import { transformStyleToTailwindcss } from './dist/index.js'
46
57const args = process . argv . slice ( 2 )
@@ -27,7 +29,7 @@ Documentation: https://github.com/Simon-He95/transform-to-tailwindcss-core#readm
2729}
2830
2931function showVersion ( ) {
30- import ( './package.json' , { assert : { type : 'json' } } )
32+ import ( './package.json' )
3133 . then ( pkg => console . log ( `v${ pkg . default . version } ` ) )
3234 . catch ( ( ) => console . log ( 'Version not found' ) )
3335}
@@ -54,15 +56,16 @@ if (!cssStyles) {
5456
5557try {
5658 const [ tailwindClasses , unconverted ] = transformStyleToTailwindcss ( cssStyles , isRem , isDebug )
57-
59+
5860 console . log ( '✅ Transformation completed!' )
5961 console . log ( `📝 Input: ${ cssStyles } ` )
6062 console . log ( `🎨 Tailwind: ${ tailwindClasses } ` )
61-
63+
6264 if ( unconverted . length > 0 ) {
6365 console . log ( `⚠️ Unconverted: ${ unconverted . join ( '; ' ) } ` )
6466 }
65- } catch ( error ) {
67+ }
68+ catch ( error ) {
6669 console . error ( '❌ Error during transformation:' , error . message )
6770 process . exit ( 1 )
6871}
You can’t perform that action at this time.
0 commit comments