Gulp build not generating any files

1.4k Views Asked by At

I am using the following gulp code to build my deployment files.

var gulp = require('gulp');
var concat = require('gulp-concat');
var minify = require('gulp-minify');
var cleanCss = require('gulp-clean-css');

gulp.task('pack-js', function () {  
    return gulp.src([
        'wp_theme/assets/js/jquery-3.1.1.min.js', 
        'wp_theme/assets/js/bootstrap.min.js', 
        'wp_theme/assets/js/assets/js/device.min.js',
        'wp_theme/assets/js/app.js'
    ])
        .pipe(concat('app-min.js'))
        .pipe(minify())
        .pipe(gulp.dest('./dist/'));
});

gulp.task('pack-css', function () { 
    return gulp.src([
        'wp_theme/assets/css/normalize.css', 
        'wp_theme/assets/css/bootstrap.min.css',
        'wp_theme/assets/js/slick/slick.css',
        'wp_theme/assets/js/slick/slick-theme.css',
        'wp_theme/assets/css/animate.min.css',
        'wp_theme/assets/fonts/font-awesome/css/font-awesome.css',
        'wp_theme/assets/fonts/font-awesome/css/font-awesome.min.css',
        'wp_theme/style.css',
    ])
        .pipe(concat('style.css'))
        .pipe(cleanCss())
   .pipe(gulp.dest('./dist/'));
});

gulp.task('default', ['pack-js', 'pack-css']);

Next, when I run the "gulp" command like I am not getting any error

$ gulp
[01:34:53] Using gulpfile ~/{directory path here}/gulpfile.js
[01:34:53] Starting 'pack-js'...
[01:34:53] Starting 'pack-css'...
[01:34:53] Finished 'pack-js' after 28 ms
[01:34:53] Finished 'pack-css' after 13 ms
[01:34:53] Starting 'default'...
[01:34:53] Finished 'default' after 39 μs

But in the "dist" folder which is in the same directory as of the "gulpfile.js" doesn't show any generated files.

I checked the version also.

$ gulp -v
[08:01:40] CLI version 3.9.1
[08:01:40] Local version 3.9.1

Anything I am doing wrong here?

0

There are 0 best solutions below