Documentation

    Interface Patterns

    The patterns to use when extracting strings from files.

    Comma-separated list of POT files whose contents should be merged with the extracted strings. If left empty, defaults to the destination POT file. POT file headers will be ignored.

    Comma-separated list of POT files whose contents should act as some sort of denylist for string extraction. Any string which is found on that denylist will not be extracted. This can be useful when you want to create multiple POT files from the same source directory with slightly different content and no duplicate strings between them.

    Whether source code references and comments from the generated POT file should be instead added to the POT file used for subtraction. Warning: this modifies the files passed to subtractPaths!

    Comma-separated list of files and paths that should be used for string extraction. If provided, only these files and folders will be taken into account for string extraction. For example, --include="src,my-file.php will ignore anything besides my-file.php and files in the src directory. Simple glob patterns can be used, i.e. --include=foo-*.php includes any PHP file with the foo- prefix. Leading and trailing slashes are ignored, i.e. /my/directory/ is the same as my/directory.

    Comma-separated list of files and paths that should be skipped for string extraction. For example, --exclude=.github,myfile.php would ignore any strings found within myfile.php or the .github folder. Simple glob patterns can be used, i.e. --exclude=foo-*.php excludes any PHP file with the foo- prefix. Leading and trailing slashes are ignored, i.e. /my/directory/ is the same as my/directory. The following files and folders are always excluded: node_modules, .git, .svn, .CVS, .hg, vendor, *.min.js.

    interface Patterns {
        exclude: string[];
        include: string[];
        mergePaths?: string[];
        subtractAndMerge?: boolean;
        subtractPaths?: string[];
    }
    Index

    Properties

    exclude: string[]
    include: string[]
    mergePaths?: string[]
    subtractAndMerge?: boolean
    subtractPaths?: string[]
    MMNEPVFCICPMFPCPTTAAATR