<commit_before>// Define Gulp Objects
var gulp            = require('gulp'),
    sass            = require('gulp-sass'),
    watch           = require('gulp-watch'),
    rimraf          = require('gulp-rimraf'),
    concat          = require('gulp-concat'),
    browserify      = require('gulp-browserify'),
    autoprefixer    = require('gulp-autoprefixer'),
    minifycss       = require('gulp-minify-css');

// Assign Destinations
dest = {
    css:    'public/css',
    js:     'public/js',
};

// Assign Sources
src = {
    sass:                   'src/css/*.scss',
    included_sass:          'src/css/**/*.scss',
    all_coffee_components:  'src/coffee/**/*.coffee',
    main_coffee:            'src/coffee/main.coffee',
    js:                     'public/js/*.js'
};

// Compile SASS
gulp.task('compile-sass', function () {
    return gulp.src(src.sass)
    .pipe(sass({
        onError: function(e) {
            console.log(e);
        },
        style: 'expanded'
    }))
    .pipe(autoprefixer("> 1%"))
    .pipe(gulp.dest(dest.css))
    .pipe(minifycss())
    .pipe(gulp.dest(dest.css));
});

// Browserify
gulp.task('browserify', function () {
  return gulp.src(src.main_coffee, { read: false })
    .pipe(browserify({
        transform: ['coffeeify'],
        extensions: ['.coffee']
    }))
    .pipe(concat('main.js'))
    .pipe(gulp.dest(dest.js));
})

// Clean JS
gulp.task('clean-js', function() {
  return gulp.src(src.js, { read: false }).pipe(rimraf());
});

// Create watcher for all tasks
gulp.task('watch', function () {
    watch({glob: src.main_coffee}, function (files) {
        gulp.start('clean-js');
        gulp.start('browserify');
    });

    watch({glob: src.all_coffee_components}, function (files) {
        gulp.start('clean-js');
        gulp.start('browserify');
    });

    watch({glob: src.sass}, function (files) {
        gulp.start('compile-sass');
    });

    watch({glob: src.included_sass}, function (files) {
        gulp.start('compile-sass');
    });
});
<commit_msg>Update Gulpfile after reading more about watch<commit_after>// Define Gulp Objects
var gulp            = require('gulp'),
    sass            = require('gulp-sass'),
    watch           = require('gulp-watch'),
    rimraf          = require('gulp-rimraf'),
    concat          = require('gulp-concat'),
    browserify      = require('gulp-browserify'),
    autoprefixer    = require('gulp-autoprefixer'),
    minifycss       = require('gulp-minify-css');

// Assign Destinations
dest = {
    css:    'public/css',
    js:     'public/js',
};

// Assign Sources
src = {
    sass:   ['src/css/*.scss', 'src/css/**/*.scss'],
    coffee: ['src/coffee/*.coffee', 'src/coffee/**/*.coffee'],
    js:     'public/js/*.js'
};

// Compile SASS
gulp.task('compile-sass', function () {
    return gulp.src(src.sass)
    .pipe(sass({
        onError: function(e) {
            console.log(e);
        },
        style: 'expanded'
    }))
    .pipe(autoprefixer("> 1%"))
    .pipe(gulp.dest(dest.css))
    .pipe(minifycss())
    .pipe(gulp.dest(dest.css));
});

// Browserify
gulp.task('browserify', function () {
  return gulp.src(src.coffee, { read: false })
    .pipe(browserify({
        transform: ['coffeeify'],
        extensions: ['.coffee']
    }))
    .pipe(concat('main.js'))
    .pipe(gulp.dest(dest.js));
})

// Clean JS
gulp.task('clean-js', function() {
  return gulp.src(src.js, { read: false }).pipe(rimraf());
});

// Create watcher for all tasks
gulp.task('watch', function () {
    watch({glob: src.coffee}, function (files) {
        gulp.start('clean-js');
        gulp.start('browserify');
    });

    watch({glob: src.sass}, function (files) {
        gulp.start('compile-sass');
    });
});

{'fraction_non_alphanumeric': 0.1918947933440687, 'fraction_numerical': 0.0005367686527106817, 'mean_word_length': 2.351618705035971, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2516497', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1293, 'n_words': 213}