<commit_before>// TODO:clean up for instance runsequnce seems to provide 
// cleaner syntax than gulp.series....
const appName = 'get from package.json would be nice';

// file handling helpers
const del = require('del');

// gulp interface
const gulp = require('gulp');

// js-scripts
const uglify = require('gulp-uglify');
const concat = require('gulp-concat');
const lintJs = require('gulp-eslint');

// style hmm  going for less
const less = require('gulp-less');
const minifyCSS = require('gulp-clean-css');
const prefix = require('gulp-autoprefixer');

// bower dependency 
const wiredep = require('gulp-wiredep');
// const wiredep = require('wiredep').stream;

// live reload in browser sync
const bSync = require('browser-sync');
const reload = bSync.reload;

// TODO: transpile babel
// TODO: pump instead of pipe 
gulp.task('js-scripts', () => {
  return gulp.src('app/scripts/**/*.js')
    // inject bower dependencies
    .pipe(concat('main.min.js'))
    .pipe(uglify())
    .pipe(gulp.dest('dist'));
});

// using less 
gulp.task('styles', () => {
  return gulp.src('app/styles/**/*.less')
    .pipe(less())
    .pipe(minifyCSS({
      compatibility: 'ie8',
    }))
    .pipe(prefix())
    .pipe(gulp.dest('dist/styles'));
});

// TODO: don't lint external dependencies
//        --error reporting 
//        --separte set of rules for dist files
gulp.task('js-lint', () => {
  return gulp.src(['**/*.js', '!node_modules/**', '!bower_components/**'])
    .pipe(lintJs());
});
gulp.task('clean', () => {
  return del(['dist']);
});

// just copy for know
gulp.task('html', () => {
  gulp.src('app/*.html')
    .pipe(gulp.dest('dist'));
});

gulp.task('serve', function (done) {
  bSync({
    server: {
      baseDir: ['dist', 'app'],
    },
  });
  done();
});

gulp.task('default',
  gulp.series('clean', 'js-lint',
    gulp.parallel('styles', 'js-scripts'),
    'serve',
    function (done) {
      gulp.watch(
        ['app/scripts/**/*.js'],
        gulp.parallel('js-scripts')
      );
      gulp.watch(
        'app/styles/**/*.less',
        gulp.parallel('styles')
      );
      gulp.watch(
        'dist/**/*',
        reload
      );
      done();
    }
  )
);<commit_msg>better namings conventions in gulpfile<commit_after>// TODO:clean up for instance runsequnce seems to provide 
// cleaner syntax than gulp.series....
const appName = 'get from package.json would be nice';

// file handling helpers
const del = require('del');

// gulp interface
const gulp = require('gulp');

// js-scripts
const uglify = require('gulp-uglify');
const concat = require('gulp-concat');
const eslint = require('gulp-eslint');

// style hmm  going for less
const less = require('gulp-less');
const minifyCSS = require('gulp-clean-css');
const prefix = require('gulp-autoprefixer');

// bower dependency 
const wiredep = require('gulp-wiredep');
// const wiredep = require('wiredep').stream;

// live reload in browser sync
const bSync = require('browser-sync');
const reload = bSync.reload;

// TODO: transpile babel
// TODO: pump instead of pipe? 
gulp.task('js-scripts', () => {
  return gulp.src('app/scripts/**/*.js')
    // inject bower dependencies
    .pipe(concat('main.min.js'))
    .pipe(uglify())
    .pipe(gulp.dest('dist'));
});

// using less 
gulp.task('styles', () => {
  return gulp.src('app/styles/**/*.less')
    .pipe(less())
    .pipe(minifyCSS({
      compatibility: 'ie8',
    }))
    .pipe(prefix())
    .pipe(gulp.dest('dist/styles'));
});

// TODO: don't lint external dependencies
//        --error reporting 
//        --separte set of rules for dist files
gulp.task('lint:js', () => {
  return gulp.src(['**/*.js', '!node_modules/**', '!bower_components/**'])
    .pipe(eslint());
});
gulp.task('clean', () => {
  return del(['dist']);
});

// just copy for know
gulp.task('html', () => {
  gulp.src('app/*.html')
    .pipe(gulp.dest('dist'));
});

gulp.task('serve:dist', function (done) {
  bSync({
    server: {
      baseDir: ['dist', 'app'],
    },
  });
  done();
});

gulp.task('default',
  gulp.series('clean', 'lint:js',
    gulp.parallel('styles', 'js-scripts'),
    'serve:dist',
    function (done) {
      gulp.watch(
        ['app/scripts/**/*.js'],
        gulp.parallel('js-scripts')
      );
      gulp.watch(
        'app/styles/**/*.less',
        gulp.parallel('styles')
      );
      gulp.watch(
        'dist/**/*',
        reload
      );
      done();
    }
  )
);
{'fraction_non_alphanumeric': 0.2080885675553547, 'fraction_numerical': 0.00045187528242205153, 'mean_word_length': 2.935111111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '231681', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1509, 'n_words': 324}