{"size": 1448, "ext": "js", "max_stars_repo_path": "gulpfile.js", "max_stars_repo_name": "TristanBlg/Isolde", "max_stars_repo_stars_event_min_datetime": "2018-09-21T17:49:11.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-18T01:30:02.000Z", "max_issues_repo_path": "gulpfile.js", "max_issues_repo_name": "TristanBlg/sortableJs", "max_issues_repo_issues_event_min_datetime": "2018-07-07T10:03:48.000Z", "max_issues_repo_issues_event_max_datetime": "2018-09-13T13:16:56.000Z", "max_forks_repo_path": "gulpfile.js", "max_forks_repo_name": "TristanBlg/sortableJs", "max_forks_repo_forks_event_min_datetime": "2018-12-10T08:59:32.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-28T15:46:27.000Z"}
{"max_stars_count": 21, "max_issues_count": 4, "max_forks_count": 10, "avg_line_length": 25.4035087719, "max_line_length": 56, "alphanum_fraction": 0.5773480663}
const gulp          = require('gulp');
const postcss       = require('gulp-postcss');
const autoprefixer  = require('autoprefixer');
const cssnano       = require('cssnano');
const concat        = require('gulp-concat');
const babel         = require('gulp-babel');
const uglify        = require('gulp-uglify');
const browserSync   = require('browser-sync');
const rename        = require("gulp-rename");

gulp.task('browserSync', () => {
  browserSync({
    server: {
      baseDir: 'src'
    },
  })
});

gulp.task('js:build', () => {
  return gulp.src('src/isolde.js')
    .pipe(babel())
    .pipe(uglify())
    .pipe(concat('isolde.min.js'))
    .pipe(gulp.dest('dist'))
});
gulp.task('css:build', () => {
  let plugins = [
    autoprefixer({browsers: ['last 1 version']}),
    cssnano()
  ];
  return gulp.src('src/isolde.css')
    .pipe(postcss(plugins))
    .pipe(rename('isolde.min.css'))
    .pipe(gulp.dest('dist'))
});
gulp.task('js', () => {
  return gulp.src('src/isolde.js')
    .pipe(browserSync.reload({
      stream: true
    }))
});
gulp.task('css', () => {
  return gulp.src('src/isolde.css')
    .pipe(browserSync.reload({
      stream: true
    }))
});

gulp.task('watch', ['browserSync', 'js', 'css'], () => {
  gulp.watch('src/isolde.css', ['css']);
  gulp.watch('src/isolde.js', ['js']);
  gulp.watch('src/index.html', browserSync.reload);
})

gulp.task('build', ['css:build', 'js:build']);

gulp.task('default', ['watch']);