<commit_before>﻿# Using ts-nameof with a Stream or Gulp

1. Pipe your *.ts* files to `tsNameof`:

    ```javascript
    var gulp = require("gulp");
    var ts = require("gulp-typescript");
    var tsNameof = require("ts-nameof");

    gulp.task("typescript", function() {
        gulp.src("src/**/*.ts")
            .pipe(tsNameof())
            .pipe(ts())
            .pipe(gulp.dest("dist"));
    });
    ```

2. Compile:

    ```bash
    gulp typescript
    ```<commit_msg>chore: Update instructions for using a stream.<commit_after>﻿# Using ts-nameof with a Stream or Gulp

1. Pipe your *.ts* files to `tsNameof`:

    ```javascript
    var gulp = require("gulp");
    var ts = require("gulp-typescript");
    var tsNameof = require("ts-nameof");

    gulp.task("typescript", function() {
        gulp.src("src/**/*.ts")
            .pipe(tsNameof.stream())
            .pipe(ts())
            .pipe(gulp.dest("dist"));
    });
    ```

2. Compile:

    ```bash
    gulp typescript
    ```
{'fraction_non_alphanumeric': 0.18008048289738432, 'fraction_numerical': 0.004024144869215292, 'mean_word_length': 2.3056478405315612, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '297992', 'n_tokens_mistral': 343, 'n_tokens_neox': 330, 'n_words': 78}