<commit_before>const babel       = require('gulp-babel'),
      browserSync = require('browser-sync').create(),
      ftp         = require('vinyl-ftp'),
      gulp        = require('gulp'),
      htmlmin     = require('gulp-htmlmin'),
      minifyCss   = require('gulp-minify-css'),
      mocha       = require('gulp-mocha'),
      plumber     = require('gulp-plumber'),
      rimraf      = require('gulp-rimraf'),
      sass        = require('gulp-sass'),
      uglify      = require('gulp-uglify'),
      usemin      = require('gulp-usemin'),
      util        = require('gulp-util');

// path regexes to match certain file groups
const glob = {
    all         : '**/*',
    assets      : 'assets/**/*',
    html        : '**/*.html',
    js          : '**/*.js',
    scss        : '**/*.scss',
    css         : '**/*.css',
    testOnline  : '**/test-online*.js', // test that should only be run locally
    testOffline : '**/test-offline-*.js' // test that can be run on travis
};

// useful paths to parts of the project
const path = {
    src   : 'src/',
    debug : 'debug/',
    ship  : 'ship/',
    bower : 'bower_components/',
    ftp   : '/site/wwwroot', // Azure Web App
    test  : 'test/'
};

// Clean the debug/ and ship/ folders
gulp.task('rmrf', () =>
    gulp.src([path.debug, path.ship])
        .pipe(rimraf())
);

// Compiles the markup (html)
gulp.task('markup', () =>
    gulp.src(path.src + glob.html)
        .pipe(gulp.dest(path.debug))
);

// Compiles the scripts (js)
gulp.task('script', () =>
    gulp.src(path.src + glob.js)
        .pipe(plumber())
        .pipe(babel())
        .pipe(gulp.dest(path.debug))
);

// Compiles the styles (css)
gulp.task('compile-css', () =>
    gulp.src(path.src + '_scss/style.scss')
        .pipe(plumber())
        .pipe(sass({
            includePaths: [
                path.bower + 'office-ui-fabric/dist/sass',
                path.src + '_scss'
            ]
         }))
        .pipe(gulp.dest(path.debug))
);

// Run tests and create a debug build of the web application
gulp.task('build', ['markup', 'script', 'compile-css', 'test-offline']);

// Creates a debug build and serves it at https://localhost:8443/
gulp.task('serve', ['build'], () => {
    browserSync.init({
        https: true,
        notify: false,
        port: 8443,
        server: {
            baseDir: path.debug,
            routes: {
                '/bower_components': 'bower_components',
                '/chartjs2beta2': 'chartjs2beta2'
            }
        }
    });

    gulp.watch(path.src + glob.scss, ['bs-stream'])<commit_msg>Added routes to support and privacyy-policy pages<commit_after>const babel       = require('gulp-babel'),
      browserSync = require('browser-sync').create(),
      ftp         = require('vinyl-ftp'),
      gulp        = require('gulp'),
      htmlmin     = require('gulp-htmlmin'),
      minifyCss   = require('gulp-minify-css'),
      mocha       = require('gulp-mocha'),
      plumber     = require('gulp-plumber'),
      rimraf      = require('gulp-rimraf'),
      sass        = require('gulp-sass'),
      uglify      = require('gulp-uglify'),
      usemin      = require('gulp-usemin'),
      util        = require('gulp-util');

// path regexes to match certain file groups
const glob = {
    all         : '**/*',
    assets      : 'assets/**/*',
    html        : '**/*.html',
    js          : '**/*.js',
    scss        : '**/*.scss',
    css         : '**/*.css',
    testOnline  : '**/test-online*.js', // test that should only be run locally
    testOffline : '**/test-offline-*.js' // test that can be run on travis
};

// useful paths to parts of the project
const path = {
    src   : 'src/',
    debug : 'debug/',
    ship  : 'ship/',
    bower : 'bower_components/',
    ftp   : '/site/wwwroot', // Azure Web App
    test  : 'test/'
};

// Clean the debug/ and ship/ folders
gulp.task('rmrf', () =>
    gulp.src([path.debug, path.ship])
        .pipe(rimraf())
);

// Compiles the markup (html)
gulp.task('markup', () =>
    gulp.src(path.src + glob.html)
        .pipe(gulp.dest(path.debug))
);

// Compiles the scripts (js)
gulp.task('script', () =>
    gulp.src(path.src + glob.js)
        .pipe(plumber())
        .pipe(babel())
        .pipe(gulp.dest(path.debug))
);

// Compiles the styles (css)
gulp.task('compile-css', () =>
    gulp.src(path.src + '_scss/style.scss')
        .pipe(plumber())
        .pipe(sass({
            includePaths: [
                path.bower + 'office-ui-fabric/dist/sass',
                path.src + '_scss'
            ]
         }))
        .pipe(gulp.dest(path.debug))
);

// Run tests and create a debug build of the web application
gulp.task('build', ['markup', 'script', 'compile-css', 'test-offline']);

// Creates a debug build and serves it at https://localhost:8443/
gulp.task('serve', ['build'], () => {
    browserSync.init({
        https: true,
        notify: false,
        port: 8443,
        server: {
            baseDir: path.debug,
            routes: {
                '/bower_components': 'bower_components',
                '/chartjs2beta2': 'chartjs2beta2',
                '/privacy-policy': 'src/privacy-policy-page.html',
                '/support': 'src/support-page.html'
            }
        }
    });

    gulp.watch(path.src + glob.scss, ['bs-stream'])
{'fraction_non_alphanumeric': 0.17835708927231808, 'fraction_numerical': 0.00450112528132033, 'mean_word_length': 1.9237938596491229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6662774', 'n_tokens_mistral': 1792, 'n_tokens_neox': 1749, 'n_words': 363}