{"size": 987, "ext": "js", "max_stars_repo_path": "gulpfile.js", "max_stars_repo_name": "rafavth/Desliza", "max_stars_repo_stars_event_min_datetime": "2020-08-05T03:57:19.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-05T03:57:19.000Z", "max_issues_repo_path": "gulpfile.js", "max_issues_repo_name": "rafavth/Desliza", "max_issues_repo_issues_event_min_datetime": "2021-05-10T05:55:36.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-10T05:55:36.000Z", "max_forks_repo_path": "gulpfile.js", "max_forks_repo_name": "rafavth/Desliza", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 24.0731707317, "max_line_length": 63, "alphanum_fraction": 0.5795339412}
let gulp = require('gulp'),
    babel = require('gulp-babel'),
    del = require('del'),
    rename = require('gulp-rename'),
    uglify = require('gulp-uglify');

function clean() {
    return del(["dist"]);
}

function renjs() {
    return gulp.src('./src/desliza.js')
        .pipe(rename('desliza.min.js'))
        .pipe(gulp.dest('dist'));
}

function rencss() {
    return gulp.src('./src/desliza.css')
        .pipe(gulp.dest('dist'))
        .pipe(gulp.dest('docs/assets/css/'));
}

function minjs() {
    return gulp.src('./dist/*.js')
        .pipe(babel({
            presets: ['@babel/env'],
            plugins: ["@babel/plugin-transform-object-assign"]
        }))
        .pipe(uglify())
        .pipe(gulp.dest('dist'))
        .pipe(gulp.dest('docs/assets/js/'));
}


exports.clean = clean;
exports.minjs = minjs;
exports.renjs = renjs;
exports.rencss = rencss;

gulp.task('compile', gulp.series(clean, renjs, rencss, minjs));
gulp.task('build', gulp.series('compile'));