Description:
The cssDir parameter, which is intended to specify the directory where CSS files are located, throws an error when a specific file is passed instead of a directory. The error occurs during the scan for unused CSS classes from Twig files.
Steps to Reproduce:
- Set the
cssDir parameter to point to a specific file (e.g., ./path/to/css/file/main.css).
- Run the script to find unused CSS classes from Twig files.
- Observe the error:
Error: ENOTDIR: not a directory, scandir './path/to/css/file/main.css'
Expected Behavior:
The cssDir parameter should allow passing a file path or handle file-specific scenarios gracefully, without causing an error.
Actual Behavior:
The script throws an ENOTDIR error when a file is passed to the cssDir parameter, expecting a directory instead.
Environment:
- Version: v1.0.0
- OS: macOS
- Node.js: v18.3.0
Error:
Error: ENOTDIR: not a directory, scandir './path/to/css/file/main.css'
Description:
The
cssDirparameter, which is intended to specify the directory where CSS files are located, throws an error when a specific file is passed instead of a directory. The error occurs during the scan for unused CSS classes from Twig files.Steps to Reproduce:
cssDirparameter to point to a specific file (e.g.,./path/to/css/file/main.css).Expected Behavior:
The
cssDirparameter should allow passing a file path or handle file-specific scenarios gracefully, without causing an error.Actual Behavior:
The script throws an
ENOTDIRerror when a file is passed to thecssDirparameter, expecting a directory instead.Environment:
Error: