<commit_before>var del = require('del');
var gulp = require('gulp');
var typescript = require('gulp-typescript');
var watch = require('gulp-watch');
var exec = require('child_process').exec;
var karma = require('karma').Server;
var path = require('path');
var runSequence = require('run-sequence');
var through2 = require('through2');

var APP_NAME = 'ngRnSeed';
var PATHS = {
  sources: {
    src: 'src/**/*.ts',
    test: 'test/**/*.ts',
    assets: 'src/assets/**/*'
  },
  destination: 'dist',
  karma: 'dist/karma',
  app: 'dist/' + APP_NAME,
  modules: [
    'node_modules/angular2/**/*',
    'node_modules/angular2-react-native/**/*',
    'node_modules/hammerjs/**/*',
    'node_modules/reflect-metadata/**/*',
    'node_modules/rxjs/**/*',
    'node_modules/zone.js/**/*'
  ]
};

/**********************************************************************************/
/*****************************   APPLICATION    ***********************************/
/**********************************************************************************/
gulp.task('clean', function (done) {
  del([PATHS.destination], done);
});
gulp.task('!create', ['clean'], function(done) {
  executeInAppDir('react-native init ' + APP_NAME, done, true);
});
gulp.task('init', ['!create'], function() {
  var copier = require('angular2-react-native/tools/copy-dependencies');
  return copier.doCopy(PATHS.modules, PATHS.app + '/node_modules');
});


gulp.task('!assets', function () {
  return gulp.src(PATHS.sources.assets, {base: './src'}).pipe(gulp.dest(PATHS.app));
});
gulp.task('!compile', ['!assets'], function () {
  return ts2js([PATHS.sources.src], PATHS.app);
});

gulp.task('!launch.android', ['!compile'], function(done) {
  executeInAppDir('react-native run-android', done);
});
gulp.task('!launch.ios', ['!compile'], function(done) {
  executeInAppDir('react-native run-ios', done);
});
gulp.task('!start.android', ['!launch.android'], function(neverDone) {
  if (/^win/.test(process.platform)) {
    executeInAppDir('react-native start');
  }
});
gulp.task('watch', function(neverDone) {
  watch([PATHS.sources.src], function() {<commit_msg>build(gulp): fix start.android task on Linux<commit_after>var del = require('del');
var gulp = require('gulp');
var typescript = require('gulp-typescript');
var watch = require('gulp-watch');
var exec = require('child_process').exec;
var karma = require('karma').Server;
var path = require('path');
var runSequence = require('run-sequence');
var through2 = require('through2');

var APP_NAME = 'ngRnSeed';
var PATHS = {
  sources: {
    src: 'src/**/*.ts',
    test: 'test/**/*.ts',
    assets: 'src/assets/**/*'
  },
  destination: 'dist',
  karma: 'dist/karma',
  app: 'dist/' + APP_NAME,
  modules: [
    'node_modules/angular2/**/*',
    'node_modules/angular2-react-native/**/*',
    'node_modules/hammerjs/**/*',
    'node_modules/reflect-metadata/**/*',
    'node_modules/rxjs/**/*',
    'node_modules/zone.js/**/*'
  ]
};

/**********************************************************************************/
/*****************************   APPLICATION    ***********************************/
/**********************************************************************************/
gulp.task('clean', function (done) {
  del([PATHS.destination], done);
});
gulp.task('!create', ['clean'], function(done) {
  executeInAppDir('react-native init ' + APP_NAME, done, true);
});
gulp.task('init', ['!create'], function() {
  var copier = require('angular2-react-native/tools/copy-dependencies');
  return copier.doCopy(PATHS.modules, PATHS.app + '/node_modules');
});


gulp.task('!assets', function () {
  return gulp.src(PATHS.sources.assets, {base: './src'}).pipe(gulp.dest(PATHS.app));
});
gulp.task('!compile', ['!assets'], function () {
  return ts2js([PATHS.sources.src], PATHS.app);
});

gulp.task('!launch.android', ['!compile'], function(done) {
  executeInAppDir('react-native run-android', done);
});
gulp.task('!launch.ios', ['!compile'], function(done) {
  executeInAppDir('react-native run-ios', done);
});
gulp.task('!start.android', ['!launch.android'], function(neverDone) {
  if (!/^darwin/.test(process.platform)) {
    executeInAppDir('react-native start');
  }
});
gulp.task('watch', function(neverDone) {
  watch([PATHS.sources.src], function() {
{'fraction_non_alphanumeric': 0.309462915601023, 'fraction_numerical': 0.0027900488258544524, 'mean_word_length': 5.3545051698670605, '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': '6904162', 'n_tokens_mistral': 1409, 'n_tokens_neox': 1369, 'n_words': 229}