<commit_before>var gulp = require('gulp'),
    //load-scripts = require('gulp-load-scripts'),
    del = require('del'),
    //changed = require('gulp-changed'),
    jshint = require('gulp-jshint'),
    ngmin = require('gulp-ngmin'),
    uglify = require('gulp-uglify'),
    sass = require('gulp-sass'),
    minify_css = require('gulp-minify-css'),
    concat = require('gulp-concat');

var paths = {
  js: 'app/assets/javascripts/*.js',
  scss: 'app/assets/stylesheets/*.scss',
  css: 'app/assets/stylesheets/*.css',
  dest_dev: 'app/assets',
  dest: 'public/assets',
  js_admin: 'app/assets/javascripts/admin/*.js',
  scss_admin: 'app/assets/stylesheets/admin/*.scss',
  css_admin: 'app/assets/stylesheets/admin/*.css',
  dest_admin_dev: 'app/assets/admin',
  dest_admin: 'public/assets/admin'
};

gulp.task('clean', function(cb) {
   del(paths.dest, cb);
});

gulp.task('vendor_js', function () {
  var files = [
    'vendor/assets/bower_components/jquery/dist/jquery.min.js',
    'vendor/assets/bower_components/angular/angular.min.js',
    'vendor/assets/bower_components/angular-animate/angular-animate.min.js',
    'vendor/assets/bower_components/angular-route/angular-route.min.js',
    'vendor/assets/bower_components/bootstrap/dist/js/bootstrap.min.js',
  ];

  return gulp.src(files)
  //.pipe(ngmin())
  .pipe(concat('vendor.js'))
  .pipe(gulp.dest(paths.dest_admin_dev))
  .pipe(gulp.dest(paths.dest_admin));
});

gulp.task('vendor_css', function () {
  var files = [
    'vendor/assets/bower_components/bootstrap/dist/css/bootstrap.min.css',
    'vendor/assets/bower_components/font-awesome/css/font-awesome.min.css',
  ];

  return gulp.src(files)
  //.pipe(minify_css())
  .pipe(concat('vendor.css'))
  .pipe(gulp.dest(paths.dest_admin_dev))
  .pipe(gulp.dest(paths.dest_admin));
});

gulp.task('vendor_fonts', function () {
  var files = [
    'vendor/assets/bower_components/font-awesome/fonts/fontawesome-webfont.eot',
    'vendor/assets/bower_components/font-awesome/fonts/fontawesome-webfont.woff',
    'vendor/assets/bower_components/font-awesome/fonts/fontawesome-webfont.ttf',
    'vendor/assets/bower_components/font-awesome/fonts/fontawesome-webfont.svg'
  ];

  return gulp.src(files)
  .pipe(gulp.dest('app/assets/fonts'))
  .pipe(gulp.dest('public/assets/fonts'));
});

gulp.task('js', ['clean'], function () {
  return gulp.src(paths.js)
  .pipe(jshint())
  //.pipe(jshint.reporter('js'))
  .pipe(uglify())
  .pipe(ngmin())
  .pipe(concat('app.js'))
  .pipe(gulp.dest(paths.dest_dev))<commit_msg>添加第三方js<commit_after>var gulp = require('gulp'),
    //load-scripts = require('gulp-load-scripts'),
    del = require('del'),
    //changed = require('gulp-changed'),
    jshint = require('gulp-jshint'),
    ngmin = require('gulp-ngmin'),
    uglify = require('gulp-uglify'),
    sass = require('gulp-sass'),
    minify_css = require('gulp-minify-css'),
    concat = require('gulp-concat');

var paths = {
  js: 'app/assets/javascripts/*.js',
  scss: 'app/assets/stylesheets/*.scss',
  css: 'app/assets/stylesheets/*.css',
  dest_dev: 'app/assets',
  dest: 'public/assets',
  js_admin: 'app/assets/javascripts/admin/*.js',
  scss_admin: 'app/assets/stylesheets/admin/*.scss',
  css_admin: 'app/assets/stylesheets/admin/*.css',
  dest_admin_dev: 'app/assets/admin',
  dest_admin: 'public/assets/admin'
};

gulp.task('clean', function(cb) {
   del(paths.dest, cb);
});

gulp.task('vendor_js', function () {
  var files = [
    'vendor/assets/bower_components/angular/angular.min.js',
    'vendor/assets/bower_components/angular-animate/angular-animate.min.js',
    'vendor/assets/bower_components/angular-route/angular-route.min.js',
    'vendor/assets/bower_components/jquery/dist/jquery.min.js',
    'vendor/assets/bower_components/bootstrap/dist/js/bootstrap.min.js',
    'vendor/assets/bower_components/bootstrap-datepicker-n9/js/bootstrap-datepicker.js',
    'vendor/assets/bower_components/bootstrap-datepicker-n9/js/locales/bootstrap-datepicker.zh-CN.js',
    'vendor/assets/bower_components/angular-bootstrap-nav-tree/dist/abn_tree_directive.js',
    'vendor/assets/bower_components/spinjs/spin.js',
    'vendor/assets/bower_components/iOS-Overlay/js/iosOverlay.js',
    'vendor/assets/bower_components/noty/js/noty/jquery.noty.js',
    'vendor/assets/bower_components/noty/js/noty/layouts/bottomRight.js',
    'vendor/assets/bower_components/noty/js/noty/themes/default.js',
  ];

  return gulp.src(files)
  //.pipe(ngmin())
  .pipe(concat('vendor.js'))
  .pipe(gulp.dest(paths.dest_admin_dev))
  .pipe(gulp.dest(paths.dest_admin));
});

gulp.task('vendor_css', function () {
  var files = [
    'vendor/assets/bower_components/font-awesome/css/font-awesome.min.css',
    'vendor/assets/bower_components/bootstrap/dist/css/bootstrap.min.css',
    'vendor/assets/bower_components/bootstrap-datepicker-n9/css/datepicker3.css',
    'vendor/assets/bower_components/angular-bootstrap-nav-tree/dist/abn_tree.css',
    'vendor/assets/bower_components/iOS-Overlay/css/iosOverlay.css',
  ];

  return gulp.src(files)
  //.pipe(minify_css())
  .pipe(concat('vendor.css'))
  .pipe(gulp.dest(paths.dest_admin_dev))
  .pipe(gulp.dest(paths.dest_admin));
});

gulp.task('vendor_fonts', function () {
  var files = [
    'vendor/assets/bower_components/font-awesome/fonts/fontawesome-webfont.eot',
    'vendor/assets/bower_components/font-awesome/fonts/fontawesome-webfont.woff',
    'vendor/assets/bower_components/font-awesome/fonts/fontawesome-webfont.ttf',
    'vendor/assets/bower_components/font-awesome/fonts/fontawesome-webfont.svg'
  ];

  return gulp.src(files)
  .pipe(gulp.dest('app/assets/fonts'))
  .pipe(gulp.dest('public/assets/fonts'));
});

gulp.task('js', ['clean'], function () {
  return gulp.src(paths.js)
  .pipe(jshint())
  //.pipe(jshint.reporter('js'))
  .pipe(uglify())
  .pipe(ngmin())
  .pipe(concat('app.js'))
  .pipe(gulp.dest(paths.dest_dev))
{'fraction_non_alphanumeric': 0.1858767611610932, 'fraction_numerical': 0.0006790018672551349, 'mean_word_length': 4.308108108108108, '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': '5745508', 'n_tokens_mistral': 2247, 'n_tokens_neox': 2241, 'n_words': 204}