<commit_before>/*global require*/

var gulp = require('gulp'),
    clean = require('gulp-clean'),
    usemin = require('gulp-usemin'),
    rev = require('gulp-rev'),
    minifyHtml = require('gulp-minify-html'),
    runSequence = require('run-sequence'),
    Builder = require('systemjs-builder');


gulp.task('build', function (callback) {
    'use strict';

    runSequence(
        'clean',
        'build:systemjs',
        'usemin',
        callback
    );
});

gulp.task('clean', function () {
    'use strict';

    return gulp.src(['dist/', 'build/'], { read: false })
        .pipe(clean({ force: true }));
});

gulp.task('build:systemjs', function (done) {
    'use strict';
    runSequence('typescript', function () {
        var builder = new Builder();

        builder.loadConfig('src/systemjs.config.js')
            .then(function () {
                return builder.buildStatic('src/app/main.js', 'build/app/bundle.js', {
                    normalize: true,
                    minify: true,
                    mangle: true,
                    runtime: false,
                    globalDefs: { DEBUG: false, ENV: 'production' }
                });
            })
            .then(function () {
                done();
            });
    });
});

gulp.task('usemin', function () {
    'use strict';
    return gulp.src('src/index.html')
        .pipe(usemin(
            {
                html: [minifyHtml({ empty: true })],
                js: [rev()],
                jsApp: [rev()],
                jsLib: [rev()]
            }
        ))
        .pipe(gulp.dest('dist/'));
});<commit_msg>copy html and css files to dist directory<commit_after>/*global require*/

var gulp = require('gulp'),
    clean = require('gulp-clean'),
    usemin = require('gulp-usemin'),
    rev = require('gulp-rev'),
    minifyHtml = require('gulp-minify-html'),
    runSequence = require('run-sequence'),
    Builder = require('systemjs-builder');


gulp.task('build', function (callback) {
    'use strict';

    runSequence(
        'clean',
        'build:systemjs',
        'usemin',
        'copy:app',
        callback
    );
});

gulp.task('clean', function () {
    'use strict';

    return gulp.src(['dist/', 'build/'], { read: false })
        .pipe(clean({ force: true }));
});

gulp.task('build:systemjs', function (done) {
    'use strict';
    runSequence('typescript', function () {
        var builder = new Builder();

        builder.loadConfig('src/systemjs.config.js')
            .then(function () {
                return builder.buildStatic('src/app/main.js', 'build/app/bundle.js', {
                    normalize: true,
                    minify: true,
                    mangle: true,
                    runtime: false,
                    globalDefs: { DEBUG: false, ENV: 'production' }
                });
            })
            .then(function () {
                done();
            });
    });
});

gulp.task('usemin', function () {
    'use strict';
    return gulp.src('src/index.html')
        .pipe(usemin(
            {
                html: [minifyHtml({ empty: true })],
                js: [rev()],
                jsApp: [rev()],
                jsLib: [rev()]
            }
        ))
        .pipe(gulp.dest('dist/'));
});

gulp.task('copy:app', function() {
    'use strict';

    return gulp.src('src/app/**/*.{css,html}')
        .pipe(gulp.dest('dist/app'))
});
{'fraction_non_alphanumeric': 0.17344252705469435, 'fraction_numerical': 0.0, 'mean_word_length': 1.7294493216280926, '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': '1750136', 'n_tokens_mistral': 1036, 'n_tokens_neox': 1006, 'n_words': 191}