<commit_before>var args = require('yargs').argv;
var cmd = require('child_process');
var fs = require('fs-extra');
var gulp = require('gulp');
var gutil = require('gulp-util');
var rename = require('gulp-rename');
var replace = require('gulp-replace');

var pwd = process.cwd();
var gwtproject = 'java';
var version = '0.3.0';
var major = version.replace(/(\d+\.\d+\.).*$/, '$1');

var component = 'vaadin-grid';
var moduleName = 'VaadinGrid';
var webDir = 'java/src/main/webapp/';
var webComponentDir = webDir + component + '/';
var componentDir = './';

function system(command, cb) {
  cmd.exec(command, function(err, stdout, stderr) {
    if (err) {
      gutil.log(stderr);
      throw err;
    }
    if (cb) {
      cb(err, stdout, stderr);
    }
  });
};

function maven(tasks, cb) {
  gutil.log(" $ mvn " + tasks);
  system('mvn -f ' + gwtproject + '/pom.xml -q ' + tasks, function() {
    gutil.log(" $ mvn " + tasks + ' [done]');
    cb();
  });
}

gulp.task('gwt:compile', ['gwt:clean-maven'], function(done) {
  if(args.gwtSkipCompile) {
    done();
    return;
  }

  gutil.log('Updating Maven dependencies ...');
  maven('compile', function() {
    var task = 'package ' + (args.gwtPretty ? ' -Ppretty' : '');
    maven(task, done);
  });
});<commit_msg>Added gulp gwt:sdm task<commit_after>var args = require('yargs').argv;
var cmd = require('child_process');
var fs = require('fs-extra');
var gulp = require('gulp');
var gutil = require('gulp-util');
var rename = require('gulp-rename');
var replace = require('gulp-replace');

var pwd = process.cwd();
var gwtproject = 'java';
var version = '0.3.0';
var major = version.replace(/(\d+\.\d+\.).*$/, '$1');

var component = 'vaadin-grid';
var moduleName = 'VaadinGrid';
var webDir = 'java/src/main/webapp/';
var webComponentDir = webDir + component + '/';
var componentDir = './';

var staticResources = ['*.html', 'dem*/**', 'tes*/**'];

function system(command, cb) {
  cmd.exec(command, function(err, stdout, stderr) {
    if (err) {
      gutil.log(stderr);
      throw err;
    }
    if (cb) {
      cb(err, stdout, stderr);
    }
  });
};

function maven(tasks, cb) {
  gutil.log(" $ mvn " + tasks);
  system('mvn -f ' + gwtproject + '/pom.xml -q ' + tasks, function() {
    gutil.log(" $ mvn " + tasks + ' [done]');
    cb();
  });
}
gulp.task('gwt:sdm', function(){
  system('mvn -f java clean gwt:run');
  gulp.watch(staticResources, ['copystatic']);
});

gulp.task('copystatic', function() {
  gutil.log('Copying static resources for sdm');
    gulp.src(staticResources)
    .pipe(gulp.dest(gwtproject + '/target/vaadin-grid-' + version));
});

gulp.task('gwt:compile', ['gwt:clean-maven'], function(done) {
  if(args.gwtSkipCompile) {
    done();
    return;
  }

  gutil.log('Updating Maven dependencies ...');
  maven('compile', function() {
    var task = 'package ' + (args.gwtPretty ? ' -Ppretty' : '');
    maven(task, done);
  });
});
{'fraction_non_alphanumeric': 0.21330589849108367, 'fraction_numerical': 0.0027434842249657062, 'mean_word_length': 3.5578125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '7096792', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1060, 'n_words': 232}