<commit_before>var gulp = require('gulp'),
    
    //css related
    sass = require('gulp-sass'),
	sourcemaps = require('gulp-sourcemaps'),
	prefix = require('gulp-autoprefixer'),
    combineMq = require('gulp-combine-mq'),
    
    //js related
    uglify = require('gulp-uglify'),
    concat = require('gulp-concat'),
    
    //Html related
    nunjucksRender = require('gulp-nunjucks-render'),
    htmlmin = require('gulp-htmlmin'),
    
    //sever related
    browserSync = require('browser-sync'),
    
    //Shared and misc
    svgstore = require('gulp-svgstore'),
    svgmin = require('gulp-svgmin'),
    rename = require('gulp-rename'),
    data = require('gulp-data'),
    
    //error control
    plumber = require('gulp-plumber');

var projectName = 'theft',
    dist = 'dist',
    scripts = projectName + '/scripts';


/* live reload */
gulp.task('browser-sync', function () {
   var files = [
      dist + '/*.html',
      dist + '/css/*.css',
      dist + '/img/*.png',
      dist + '/js/*.js'
   ];

   browserSync.init(files, {
      server: {
         baseDir: './' + dist
      },
      open: false
   });
});

gulp.task('browser-sync-open-browser', function () {
   var files = [
      dist + '/*.html',
      dist + '/css/*.css',
      dist + '/img/*.png',
      dist + '/js/*.js'
   ];

   browserSync.init(files, {
      server: {
         baseDir: './' + dist
      }
   });
});

/* style related components */
/* scss css */

// scssToCss
gulp.task('scssToCss', function () {
    gulp.src(projectName + '/scss/**/*.scss')
        .pipe(sourcemaps.init())
        .pipe(sass({
            outputStyle: 'compressed'
        }))
        .pipe(plumber())
        .pipe(combineMq({
            beautify: false
        }))
        .pipe(prefix('last 4 versions'))
        .pipe(sourcemaps.write('../sourceMaps_css'))
        .pipe(gulp.dest(dist + '/css/'));
});

// scssToCss
gulp.task('scssToCssWeb', function () {
    gulp.src(projectName + '/scss/**/*.scss')
        .pipe(sass({
            outputStyle: 'compressed'
        }))
        .pipe(plumber())
        .pipe(combineMq({
            beautify: false
        }))
        .pipe(prefix('last 4 versions'))
        .pipe(gulp.dest(dist + '/css/'));
});

// js compress
gulp.task('jsCompress', function () {
    gulp.src([
         scripts + '/lib/keycodex-cust.js',
         scripts + '/mode-local.js',
         scripts + '/sys-var.js', 
         scripts + '/main.js', 
         scripts + '/game-page.js',
         scripts + '/greet.js'
        ])
        .pipe(concat('script.js'))
        .pipe(uglify())
        .pipe(plumber())
        .pipe(gulp.dest(dist + '/js/'));
});
// js compress distribution version
gulp.task('jsCompressWeb', function () {
    gulp.src([<commit_msg>ie removed from autoprefixer to reduce css size<commit_after>var gulp = require('gulp'),
    
    //css related
    sass = require('gulp-sass'),
	sourcemaps = require('gulp-sourcemaps'),
	prefix = require('gulp-autoprefixer'),
    combineMq = require('gulp-combine-mq'),
    
    //js related
    uglify = require('gulp-uglify'),
    concat = require('gulp-concat'),
    
    //Html related
    nunjucksRender = require('gulp-nunjucks-render'),
    htmlmin = require('gulp-htmlmin'),
    
    //sever related
    browserSync = require('browser-sync'),
    
    //Shared and misc
    svgstore = require('gulp-svgstore'),
    svgmin = require('gulp-svgmin'),
    rename = require('gulp-rename'),
    data = require('gulp-data'),
    
    //error control
    plumber = require('gulp-plumber');

var projectName = 'theft',
    dist = 'dist',
    scripts = projectName + '/scripts';


/* live reload */

// sync list
var syncList = [
    dist + '/*.html',
    dist + '/css/*.css',
    dist + '/img/*.png',
    dist + '/js/*.js'
];

gulp.task('browser-sync', function () {
   var files = syncList;

   browserSync.init(files, {
      server: {
         baseDir: './' + dist
      },
      open: false
   });
});

gulp.task('browser-sync-open-browser', function () {
   var files = syncList;

   browserSync.init(files, {
      server: {
         baseDir: './' + dist
      }
   });
});

/* style related components */
/* scss css */

// Browser list
var browserList = [
    "chrome 40",
    "edge 13",
    "firefox 40",
    "ios_saf 7",
    "safari 8"
];

// scssToCss
gulp.task('scssToCss', function () {
    gulp.src(projectName + '/scss/**/*.scss')
        .pipe(sourcemaps.init())
        .pipe(sass({
            outputStyle: 'compressed'
        }))
        .pipe(plumber())
        .pipe(combineMq({
            beautify: false
        }))
        .pipe(prefix(browserList))
        .pipe(sourcemaps.write('../sourceMaps_css'))
        .pipe(gulp.dest(dist + '/css/'));
});

// scssToCss
gulp.task('scssToCssWeb', function () {
    gulp.src(projectName + '/scss/**/*.scss')
        .pipe(sass({
            outputStyle: 'compressed'
        }))
        .pipe(plumber())
        .pipe(combineMq({
            beautify: false
        }))
        .pipe(prefix(browserList))
        .pipe(gulp.dest(dist + '/css/'));
});

// js compress
gulp.task('jsCompress', function () {
    gulp.src([
         scripts + '/lib/keycodex-cust.js',
         scripts + '/mode-local.js',
         scripts + '/sys-var.js', 
         scripts + '/main.js', 
         scripts + '/game-page.js',
         scripts + '/greet.js'
        ])
        .pipe(concat('script.js'))
        .pipe(uglify())
        .pipe(plumber())
        .pipe(gulp.dest(dist + '/js/'));
});
// js compress distribution version
gulp.task('jsCompressWeb', function () {
    gulp.src([
{'fraction_non_alphanumeric': 0.18701948864652243, 'fraction_numerical': 0.0017879492222420883, 'mean_word_length': 2.063526834611172, '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': '444551', 'n_tokens_mistral': 1916, 'n_tokens_neox': 1887, 'n_words': 330}