<commit_before>var gulp = require('gulp');
var sass = require('gulp-sass');
var sequence = require('run-sequence');
var rimraf = require('rimraf');
var rubySass = require('gulp-ruby-sass');
var rename = require('gulp-rename');
var Super = require('supercollider').init;
var uglify = require('gulp-uglify');
var umd = require('gulp-umd');

gulp.task('clean', function(done) {
  rimraf('./_build, ./docs/*.md', done);
});

gulp.task('docs', function() {
  return gulp.src('./docs/src/*.md')
    .pipe(Super({
      template: './docs/src/_template.hbs',
      adapters: ['sass'],
      extension: 'md',
      marked: false
    }))
    .pipe(gulp.dest('./docs'));
});

gulp.task('sass', function() {
  return gulp.src('./motion-ui.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.dest('./_build'));
});

gulp.task('javascript', function() {
  return gulp.src('./motion-ui.js')
    .pipe(umd({
      dependencies: function(file) {
        return [{ name: 'jquery', amd: 'jquery', cjs: 'jquery', global: 'jQuery', param: '$' }];
      },
      exports: function(file) {
        return 'MotionUI';
      },
      namespace: function(file) {
        return 'MotionUI';
      }
    }))
    .pipe(gulp.dest('./_build'));
});

gulp.task('dist', ['dist:sass', 'dist:javascript']);

gulp.task('dist:sass', ['sass'], function() {
  return gulp.src('./_build/motion-ui.css')
    .pipe(gulp.dest('./dist'))
    .pipe(sass({
      outputStyle: 'compressed'
    }))
    .pipe(rename('motion-ui.min.css'))
    .pipe(gulp.dest('./dist'));
});

gulp.task('dist:javascript', ['javascript'], function() {
  return gulp.src('./_build/motion-ui.js')
    .pipe(gulp.dest('./dist'))
    .pipe(uglify())
    .pipe(rename('motion-ui.min.js'))
    .pipe(gulp.dest('./dist'));
});

gulp.task('build', function(done) {
  sequence('clean', ['docs', 'sass', 'javascript'], done);
});

gulp.task('default', ['build'], function() {
  gulp.watch('./docs/*.md', ['docs']);
  gulp.watch(['./src/**/*.scss', './motion-ui.scss'], ['sass']);
  gulp.watch('./motion-ui.js', ['javascript']);
});<commit_msg>Fix Gulpfile not watching and deleting certain files properly<commit_after>var gulp = require('gulp');
var sass = require('gulp-sass');
var sequence = require('run-sequence');
var rimraf = require('rimraf').sync;
var rubySass = require('gulp-ruby-sass');
var rename = require('gulp-rename');
var Super = require('supercollider').init;
var uglify = require('gulp-uglify');
var umd = require('gulp-umd');

gulp.task('clean', function(done) {
  rimraf('./_build');
  rimraf('./docs/*.md');
  done();
});

gulp.task('docs', function() {
  return gulp.src('./docs/src/*.md')
    .pipe(Super({
      template: './docs/src/_template.hbs',
      adapters: ['sass'],
      extension: 'md',
      marked: false
    }))
    .pipe(gulp.dest('./docs'));
});

gulp.task('sass', function() {
  return gulp.src('./motion-ui.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.dest('./_build'));
});

gulp.task('javascript', function() {
  return gulp.src('./motion-ui.js')
    .pipe(umd({
      dependencies: function(file) {
        return [{ name: 'jquery', amd: 'jquery', cjs: 'jquery', global: 'jQuery', param: '$' }];
      },
      exports: function(file) {
        return 'MotionUI';
      },
      namespace: function(file) {
        return 'MotionUI';
      }
    }))
    .pipe(gulp.dest('./_build'));
});

gulp.task('dist', ['dist:sass', 'dist:javascript']);

gulp.task('dist:sass', ['sass'], function() {
  return gulp.src('./_build/motion-ui.css')
    .pipe(gulp.dest('./dist'))
    .pipe(sass({
      outputStyle: 'compressed'
    }))
    .pipe(rename('motion-ui.min.css'))
    .pipe(gulp.dest('./dist'));
});

gulp.task('dist:javascript', ['javascript'], function() {
  return gulp.src('./_build/motion-ui.js')
    .pipe(gulp.dest('./dist'))
    .pipe(uglify())
    .pipe(rename('motion-ui.min.js'))
    .pipe(gulp.dest('./dist'));
});

gulp.task('build', function(done) {
  sequence('clean', ['docs', 'sass', 'javascript'], done);
});

gulp.task('default', ['build'], function() {
  gulp.watch(['./docs/src/*.md', './docs/src/_template.hbs'], ['docs']);
  gulp.watch(['./src/**/*.scss', './motion-ui.scss'], ['sass']);
  gulp.watch('./motion-ui.js', ['javascript']);
});
{'fraction_non_alphanumeric': 0.2522860492379836, 'fraction_numerical': 0.0, 'mean_word_length': 3.523860021208908, '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': '4456807', 'n_tokens_mistral': 1547, 'n_tokens_neox': 1517, 'n_words': 247}