untitled

05/10/2019 - 11:07 pm
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require("gulp-rename");

gulp.task('sass', function() {
    gulp.src('./src/sass/estilo.scss')
        .pipe(sass({
            outputStyle:'compressed'
        }))
        .pipe(rename('estilo.min.css'))
        .pipe(gulp.dest('./src/css'));
});
 
gulp.task('concat', function() {
  return gulp.src(['./src/js/main.js', './src/js/script1.js', './src/js/script2.js'])
    .pipe(concat('todo.js'))
    .pipe(uglify())
    .pipe(rename('script.min.js'))
    .pipe(gulp.dest('./src/js'));
});