0.2.1 • Published 5 years ago
tailwind-sort-class-names v0.2.1
install
yarn add tailwind-sort-class-namesusage
yarn run tw-scn your-file.tsx [... other files seperated by empty space] initiales setup um sortierungsliste zu schreiben
setup with intellij via external tool (webstorm, phpstorm, ...)
Neues external tool erstellen via Settings > Tools > External Tools > +

Program:=> path to yarn-binary (e.g.C:\Program Files (x86)\Yarn\bin\yarn)Arguments:node sort-class-names.js $FilePath$tw-scn(script from this repo - you need to copy it into your workspace)- (empty space to seperate the script from its argument)
$FilePath$which is the currently edited file
Working Directory:=>$ProjectFileDir$(so that the node-script can use the node_modules folder correctly with the correct wrking dir)- uncheck
open console for tool output - check
Synchronize Files after execution
create this external tool as a shortcut
setup with intellij via filewatcher (webstorm, phpstorm, ...)
Neuen custom File Watcher erstellen via Settings > Tools > File Watchers > + > custom und wie folgt einrichten:

Program:=> path to yarn-binary (e.g.C:\Program Files (x86)\Yarn\bin\yarn)Arguments:node sort-class-names.js $FilePath$node sort-class-names.js(script from this repo - you need to copy it into your workspace)- (empty space to seperate the script from its argument)
$FilePath$which is the currently edited file
Output paths to refres:=>$FilePath$Working Directory:=>$ProjectFileDir$(so that the node-script can use the node_modules folder correctly with the correct wrking dir)- (ausklappen von "Working directory and Environment Variables")
- disable
Auto-save edited files to trigger the watcher - (make sure to not use prettier on save on this files)