<commit_before>'use strict';

var plumber = require('gulp-plumber');

module.exports = function(gulp, config) {

  var channels = require('gulp-channels')(gulp, config);

  var src = config.src;
  gulp.task('ng:src/scripts', function() {
    gulp.src(src.scripts, {cwd: src.cwd, base: src.cwd})
      .pipe(plumber())
      .pipe(channels.scripts.src());
  });

  gulp.task('ng:dist/scripts', function() {
    gulp.src(src.scripts, {cwd: src.cwd, base: src.cwd})
      .pipe(debug())
      .pipe(channels.scripts.dist());
  });

};


/*

var gulp = require('gulp');
var config = require('./../../config'), src = config.src;
var pkg = require(process.cwd() + '/package.json');

var concat = require('gulp-concat-util');
var sourcemaps = require('gulp-sourcemaps');
var rename = require('gulp-rename');
var changed = require('gulp-changed');

var concatScripts = config.requireTransform('concat-scripts');
var annotate = config.requireTransform('ng-annotate');
var uglify = config.requireTransform('uglify-js');

gulp.task('ng-factory:src/scripts', function() {

  // @todo coffee/es6?
  return gulp.src(src.scripts, {cwd: src.cwd})
    .pipe(gulp.dest(src.tmp));

});

gulp.task('ng-factory:dist/scripts', function() {

  // Build unified pkg.name scripts
  return gulp.src(src.scripts, {cwd: src.cwd})
    .pipe(changed(src.dest))
    .pipe(sourcemaps.init())
    .pipe(annotate())
    .pipe(concatScripts(function(path) {
      var dir = path.dirname.split(path.sep).pop();
      path.basename = dir !== src.cwd ? dir : pkg.name;
      path.extname = '.js';
    }))
    .pipe(concat.header(config.banner))
    .pipe(gulp.dest(src.dest))
    .pipe(rename(function(path) { path.extname = '.min.js'; }))
    .pipe(uglify())
    .pipe(concat.header(config.banner))
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest(src.dest));

});

*/<commit_msg>chore(scripts): wip<commit_after>'use strict';

var reload = require('browser-sync').reload;
var plumber = require('gulp-plumber');

module.exports = function(gulp, config) {

  var channels = require('gulp-channels')(gulp, config);

  var src = config.src;
  gulp.task('ng:src/scripts', function() {
    gulp.src(src.scripts, {cwd: src.cwd, base: src.cwd})
      .pipe(plumber())
      .pipe(channels.scripts.src())
      .pipe(reload({stream: true}));
  });

  gulp.task('ng:dist/scripts', function() {
    gulp.src(src.scripts, {cwd: src.cwd, base: src.cwd})
      .pipe(channels.scripts.dist());
  });

};
{'fraction_non_alphanumeric': 0.20317589576547232, 'fraction_numerical': 0.00040716612377850165, 'mean_word_length': 3.7432432432432434, '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': '7357410', 'n_tokens_mistral': 896, 'n_tokens_neox': 880, 'n_words': 146}