This Go program is designed to analyze .svelte
files in a directory, identifying which files are used and which are not. It provides an option to search recursively and can output the list of unused files to a text file.
-d
: Specifies the directory to search for.svelte
files. Defaults to the/src
directory.-i
: Specifies the input file containing a list of files to ignore. Defaults toignore_files.txt
.-o
: Specifies the output file for the list of unused files. Defaults tounused_files.txt
.-v
: Enables verbose output. (This will also disable the progress display.)-np
: Disables the progress display (useful when redirecting output).-r
: Enables recursive search (to also find files only used in unused files).
Download the latest release from the releases page and place it in the package directory, the program will analyze the /src
folder.
Then run the executable from the command line with the flags you need.
The program will output the list of unused files to the specified output file (defaults to unused_files.txt
).
./svelte-unused-components -r
- Clone the repository:
git clone https://github.com/FerrarioChristian/svelte-unused-components.git cd svelte-unused-components
- Build the program:
go build .
- Run the program:
./svelte-unused-components -r
Distributed under the MIT License. See LICENSE.txt
for more information.