-
Notifications
You must be signed in to change notification settings - Fork 0
fix: prettier tailwind path for save on format #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||
| const fs = require( 'fs' ); | ||||||
| const path = require( 'path' ); | ||||||
|
|
||||||
| function findTailwindStylesheet() { | ||||||
| const relative = 'web/app/themes/sage/resources/styles/base/config.css'; | ||||||
|
|
||||||
| const roots = []; | ||||||
|
|
||||||
| // 1. PWD / VSCODE_CWD env vars — set to the project root by the shell and | ||||||
| // VSCode, and unlike process.cwd() they survive being reset to '/'. | ||||||
| if ( process.env.VSCODE_CWD ) roots.push( process.env.VSCODE_CWD ); | ||||||
| if ( process.env.PWD ) roots.push( process.env.PWD ); | ||||||
|
|
||||||
| // 2. Installed normally (no symlink): strip at the first node_modules boundary. | ||||||
| const nmIndex = __dirname.indexOf( 'node_modules' ); | ||||||
| if ( nmIndex > 0 ) { | ||||||
| roots.push( __dirname.substring( 0, nmIndex - 1 ) ); | ||||||
|
||||||
| roots.push( __dirname.substring( 0, nmIndex - 1 ) ); | |
| roots.push( __dirname.slice( 0, nmIndex ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Werkt trouwens ook voor PHPStorm users