<commit_before>// TODO Step 3 - include gulp
var gulp = require('gulp');
// TODO Step 4.1 - include gulp-uglify
var uglify = require('gulp-uglify');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
// TODO Step 6.3a - include browserSync
var browserSync = require('browser-sync');

// TODO Step 4.2 - uglify / minify JavaScript
gulp.task('minify', function() {
  gulp.src('js/main.js')
  .pipe(uglify())
  .pipe(gulp.dest('build'));
});

gulp.task('processCSS', function() {
  gulp.src('styles/main.css')
  .pipe(sourcemaps.init())
  .pipe(autoprefixer())
  .pipe(sourcemaps.write())
  .pipe(gulp.dest('build'));
});

// TODO Step 6.1 - add default tasks
gulp.task('default', ['serve']);

// TODO Step 6.2 - watch files
gulp.task('watch', function() {
  gulp.watch('styles/*.css', ['processCSS']);
  gulp.watch('js/*.js', ['minify']);
});

// TODO Step 6.3b - run a local server
gulp.task('serve', ['processCSS', 'minify'], function() {
  browserSync.init({
    server: '.'
  });
  gulp.watch('styles/*.css', ['processCSS']);
  gulp.watch('js/*.js', ['minify']);
  gulp.watch('*.html').on('change', browserSync.reload);
});<commit_msg>gulp lab: specify browsersync port<commit_after>// TODO Step 3 - include gulp
var gulp = require('gulp');
// TODO Step 4.1 - include gulp-uglify
var uglify = require('gulp-uglify');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
// TODO Step 6.3a - include browserSync
var browserSync = require('browser-sync');

// TODO Step 4.2 - uglify / minify JavaScript
gulp.task('minify', function() {
  gulp.src('js/main.js')
  .pipe(uglify())
  .pipe(gulp.dest('build'));
});

gulp.task('processCSS', function() {
  gulp.src('styles/main.css')
  .pipe(sourcemaps.init())
  .pipe(autoprefixer())
  .pipe(sourcemaps.write())
  .pipe(gulp.dest('build'));
});

// TODO Step 6.1 - add default tasks
gulp.task('default', ['serve']);

// TODO Step 6.2 - watch files
gulp.task('watch', function() {
  gulp.watch('styles/*.css', ['processCSS']);
  gulp.watch('js/*.js', ['minify']);
});

// TODO Step 6.3b - run a local server
gulp.task('serve', ['processCSS', 'minify'], function() {
  browserSync.init({
    server: '.',
    port: 3000
  });
  gulp.watch('styles/*.css', ['processCSS']);
  gulp.watch('js/*.js', ['minify']);
  gulp.watch('*.html').on('change', browserSync.reload);
});
{'fraction_non_alphanumeric': 0.22152690863579474, 'fraction_numerical': 0.012515644555694618, 'mean_word_length': 4.1792656587473, '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': '2241921', 'n_tokens_mistral': 880, 'n_tokens_neox': 866, 'n_words': 180}