Skip to content

Gulp not generating any files #2128

@kunalm

Description

@kunalm

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

"use strict";

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

gulp.task('pack-js', function() {	
	return gulp.src(
        [
            '/assets/js/jquery-3.1.1.min.js', 
            '/assets/js/bootstrap.min.js', 
            '/assets/js/assets/js/device.min.js',
            '/assets/js/app.js'
        ],
        { base : '.' }
    )
        .pipe( debug() )
        .pipe( concat('app-min.js') )
        .pipe( minify() )
        .pipe( gulp.dest('dist/js/') );
});
 
gulp.task('pack-css', function() {	
	return gulp.src(
        [
            '/assets/css/normalize.css', 
            '/assets/css/bootstrap.min.css',
            '/assets/js/slick/slick.css',
            '/assets/js/slick/slick-theme.css',
            '/assets/css/animate.min.css',
            '/assets/fonts/font-awesome/css/font-awesome.css',
            '/assets/fonts/font-awesome/css/font-awesome.min.css',
            '/style.css'
        ],
        { base : '.' }
    )
        .pipe( debug() )
        .pipe( concat('style.css') )
        .pipe( cleanCss() )
        .pipe( gulp.dest('dist/css/') );
});
 
gulp.task( 'default', [ 'pack-js', 'pack-css' ] );

When I run the "gulp" command this is the result I get.

$ gulp
[12:12:16] Using gulpfile ~/{right path to the directory where it should be}/gulpfile.js
[12:12:16] Starting 'pack-js'...
[12:12:16] Starting 'pack-css'...
[12:12:16] gulp-debug: 0 items
[12:12:16] Finished 'pack-js' after 19 ms
[12:12:16] gulp-debug: 0 items
[12:12:16] Finished 'pack-css' after 11 ms
[12:12:16] Starting 'default'...
[12:12:16] Finished 'default' after 59 μ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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions