<commit_before>'use strict';

const gulp = tars.packages.gulp;
const runSequence = tars.packages.runSequence.use(gulp);

/**
 * Watcher for images for symbols (svg)
 */
module.exports = () => {

    if (tars.config.svg.active && tars.config.svg.workflow === 'symbols') {

        return tars.packages.chokidar.watch(
            'markup/' + tars.config.fs.staticFolderName + '/' + tars.config.fs.imagesFolderName + '/svg/**/*.svg',
            tars.options.watch
        ).on('all', (event, watchedPath) => {
            tars.helpers.watcherLog(event, watchedPath);

            switch (tars.config.svg.symbolsConfig.loadingType) {
                case 'separate-file':
                case 'separate-file-with-link':
                    runSequence(
                        'images:minify-svg',
                        'images:make-symbols-sprite',
                        'html:concat-modules-data',
                        () => {}
                    );
                    break;
                case 'inject':
                default:
                    runSequence(
                        'images:minify-svg',
                        'images:make-symbols-sprite',
                        'html:concat-modules-data',
                        'html:compile-templates',
                        () => {}
                    );
                    break;
            }
        });
    }

    return false;
};<commit_msg>TARS-190, TARS-187: add links to video in docs, fix bug with wathcer for svg for symbols<commit_after>'use strict';

const gulp = tars.packages.gulp;
const runSequence = tars.packages.runSequence.use(gulp);

/**
 * Watcher for images for symbols (svg)
 */
module.exports = () => {

    if (tars.config.svg.active && tars.config.svg.workflow === 'symbols') {

        return tars.packages.chokidar.watch(
            'markup/' + tars.config.fs.staticFolderName + '/' + tars.config.fs.imagesFolderName + '/svg/**/*.svg',
            tars.options.watch
        ).on('all', (event, watchedPath) => {
            tars.helpers.watcherLog(event, watchedPath);

            runSequence(
                'images:minify-svg',
                'images:make-symbols-sprite',
                'html:concat-modules-data',
                'html:compile-templates',
                () => {}
            );
        });
    }

    return false;
};
{'fraction_non_alphanumeric': 0.13914893617021276, 'fraction_numerical': 0.002553191489361702, 'mean_word_length': 1.485200845665962, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5808729', 'n_tokens_mistral': 690, 'n_tokens_neox': 652, 'n_words': 106}