xt-clean
xt-clean
command removes all automatically generated files from the project directories.
Clean operation iterates over files and directories listed in the project .gitignore
file, and removes all ignored files and directories, except node_modules/
, .idea/
, and .vscode/
. .idea
is a collection of configuration files used by WebStorm IDE, and .vscode
is the same for Visual Studio Code. The IDE will generate them automatically if they are absent. To remove these three directories, you must explicitly pass a flag to delete each directory respectively.
Commands
Braces { }
indicate that the user must choose one (and only one) of the items inside the braces.
Remove ignored files (default)
1 |
|
Clear ignored files, including node_modules
1 |
|
Clear ignored files, including .idea/
directory
1 |
|
Clear ignored files, including .vscode/
directory
1 |
|
Clear absolutely all ignored files
1 |
|
Get help using this command
1 |
|
Package.json scripts
After installing extension-cli, you can run these commands from a terminal using syntax npx xt-clean
.
Or you can add an option to packages.json
scripts section and then execute the command as npm run clean
See example below.
1 2 3 |
|