<commit_before>const gulp = require('gulp');
const maps = require('gulp-sourcemaps');
const webpack = require('webpack-stream');
const eslint = require('gulp-eslint');

var lintFiles = ['**/*.js', '!node_modules/**', '!build/**', '!**/*spec.js',
'!**/*test.js', '!test/**bundle.**'];
var statFiles = ['app/**/*.html'];

gulp.task('static:dev', () => {
  gulp.src(statFiles)
    .pipe(gulp.dest('./build'));
});

gulp.task('sass:dev', () => {
  gulp.src('app/scss/*.scss')
    .pipe(maps.init())
    .pipe(sass().on('error', sass.logError))
    .pipe(maps.write('./'))
    .pipe(gulp.dest('./build'));
});

gulp.task('lint:dev', () => {
  return gulp.src(lintFiles)
    .pipe(eslint)
    .pipe(eslint.format());
});

gulp.task('lint', ['lint:dev']);
gulp.task('build', ['sass:dev', 'static:dev']);<commit_msg>edit gulpfile<commit_after>const gulp = require('gulp');
const sass = require('gulp-sass');
const maps = require('gulp-sourcemaps');
const protractor = require('gulp-protractor').protractor;
const cp = require('child_process');
const webpack = require('webpack-stream');
const eslint = require('gulp-eslint');
const mongoose = require('mongoose');
const mongoUri = 'mongodb://localhost/bands_test';

var lintFiles = ['**/*.js', '!node_modules/**', '!build/**', '!**/*spec.js',
'!**/*test.js', '!test/**bundle.**', '!*.conf.js'];
var statFiles = ['app/**/*.html'];
var children = [];

function killcp() {
  children.forEach((child) => {
    child.kill('SIGTERM');
  });
}

// gulp.task('sass:dev', () => {
//   gulp.src('app/scss/*.scss')
//     .pipe(maps.init())
//     .pipe(sass().on('error', sass.logError))
//     .pipe(maps.write('./'))
//     .pipe(gulp.dest('./build'));
// });

gulp.task('webpack:dev', () => {
  gulp.src('app/js/entry.js')
    .pipe(webpack( {
      devtool: 'source-map',
      output: {
        filename: 'bundle.js'
      }
    }))
    .pipe(gulp.dest('./build'));
});

// gulp.task('webpack:test', () => {
//   return gulp.src('test/unit/entry.js')
//     .pipe(webpack({
//       devtool: 'source-map',
//       output: {
//         filename: 'bundle.js'
//       },
//       module: {
//         loaders: [
//           {
//             test: /\.html$/,
//             loader: 'html'
//           }
//         ]
//       }
//     }))
//     .pipe(gulp.dest('test/'));
// });
//
// gulp.task('webpack:protractor', () => {
//   gulp.src('test/integration/**.js')
//     .pipe(webpack( {
//       devtool: 'source-map',
//       output: {
//         filename: 'pro_bundle.js'
//       }
//     }))
//     .pipe(gulp.dest('./test'));
// });

gulp.task('static:dev', () => {
  gulp.src(statFiles)
    .pipe(gulp.dest('./build'));
});

// gulp.task('mongoDB:test', (done) => {
//   children.push(cp.spawn('mongod'));
//   setTimeout(done, 1000);
// });
//
// gulp.task('dropDb:test', ['mongoDB:test'], (done) => {
//   mongoose.connect(mongoUri, () => {
//     mongoose.connection.db.dropDatabase(() => {
//       mongoose.disconnect(done);
//     });
//   });
// });
//
// gulp.task('startservers:test', (done) => {
//   children.push(cp.fork('server.js'));
//   children.push(cp.fork('../server/server.js', [], { env: { MONGODB_URI: mongoUri } } ));
//   children.push(cp.spawn('webdriver-manager', ['start']));
//   setTimeout(done, 1000);
// });
//
// gulp.task('protractor:test', ['build', 'startservers:test', 'dropDb:test'], () => {
//   gulp.src('test/integration/**/*spec.js')
//     .pipe(protractor({
//       configFile: 'test/integration/config.js'
//     }))
//     .on('end', () => {
//       killcp();
//     })
//     .on('error', () => {
//       killcp();
//     });
// });

gulp.task('lint:dev', () => {
  return gulp.src(lintFiles)
    .pipe(eslint())
    .pipe(eslint.format());
});

// gulp.task('sass', ['sass:dev']);
// gulp.task('sass:watch', () => {
//   gulp.watch('./*scss', ['sass:dev']);
// });
// gulp.task('test', ['protractor:test', 'webpack:protractor']);
gulp.task('build', ['webpack:dev', 'static:dev']);
gulp.task('lint', ['lint:dev']);
//gulp.task('default', ['build', 'lint', 'test']);
{'fraction_non_alphanumeric': 0.2881773399014778, 'fraction_numerical': 0.0019704433497536944, 'mean_word_length': 2.802434456928839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 22, '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': '6229167', 'n_tokens_mistral': 1525, 'n_tokens_neox': 1506, 'n_words': 188}