<commit_before>var gulp = require('gulp');
var browserify = require('browserify');
var transform = require('vinyl-transform');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');

var paths = {
  index: "./demo.js",
  html: "./index.html",
  images: "./*.png",

  windowsill_dev_js: "../windowsill/**/*.js",
  windowsill_dev_static: "../windowsill/**/*.css",
  desktopical_dev_js: "../desktopical/**/*.js",
  desktopical_dev_static: "../desktopical/**/*.css",

  deploy: "/srv/http/tom.shea.at/desktopical-demo/"
};

function onError(err) {
  console.error(err.toString());
  this.emit('end');
}

gulp.task('browserify', function() {
  var browserifyTransform = transform(function(filename) {
    var b = browserify({entries: filename, debug:true});
    return b.bundle();
  });

  return gulp.src(paths.index)
    .pipe(browserifyTransform)
    .on('error', onError)
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(uglify())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('./build'));
});

gulp.task('watch', function() {
  gulp.watch([paths.index, paths.windowsill_dev_js, paths.desktopical_dev_js], ['deploy-js']);<commit_msg>Add apps to gulp watchlist<commit_after>var gulp = require('gulp');
var browserify = require('browserify');
var transform = require('vinyl-transform');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');

var paths = {
  index: "./demo.js",
  html: "./index.html",
  images: "./*.png",
  apps: "./apps/*.js"

  windowsill_dev_js: "../windowsill/**/*.js",
  windowsill_dev_static: "../windowsill/**/*.css",
  desktopical_dev_js: "../desktopical/**/*.js",
  desktopical_dev_static: "../desktopical/**/*.css",

  deploy: "/srv/http/tom.shea.at/desktopical-demo/"
};

function onError(err) {
  console.error(err.toString());
  this.emit('end');
}

gulp.task('browserify', function() {
  var browserifyTransform = transform(function(filename) {
    var b = browserify({entries: filename, debug:true});
    return b.bundle();
  });

  return gulp.src(paths.index)
    .pipe(browserifyTransform)
    .on('error', onError)
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(uglify())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('./build'));
});

gulp.task('watch', function() {
  gulp.watch([paths.index, paths.apps, paths.windowsill_dev_js, paths.desktopical_dev_js], ['deploy-js']);
{'fraction_non_alphanumeric': 0.2079664570230608, 'fraction_numerical': 0.0, 'mean_word_length': 4.337807606263982, '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': '284418', 'n_tokens_mistral': 835, 'n_tokens_neox': 816, 'n_words': 136}