serge-clean-ts

Serge

# `serge-clean-ts`

# NAME

serge-clean-ts - Delete orphaned translation files

# SYNOPSIS

`serge clean-ts [configuration-files] [--dry-run] [--for-each="do something with '[PATH]'"]`

Where `[configuration-files]` is a path to a specific .serge file, or a directory to scan .serge files in. You can specify multiple paths as separate command-line parameters. If no paths provided, Serge will look up for .serge files in the current directory.

# DESCRIPTION

Gather all target translation directories and known file paths from all provided configuration files (assuming that path to these files contains a /%LOCALE%/ folder, otherwise the script will bail out), then delete all unknown (orphaned) files from those target directories.

# OPTIONS

--dry-run

  Just report orphaned translation files, do not delete them.

--for-each=command

  For each deleted file or deleted empty folder, run the specified command. The command is ran after the deletion. Inside command, use the '[PATH]' placeholder, which will be substituted with the full path to the file or directory. Make sure to surrond [PATH] in quotes according to your shell rules if the paths are likely to contain spaces.

# SEE ALSO

Part of serge suite.