I am trying to create all.js
file from all .js
files in one folder with the help of gulp. But i am not getting all.js
file.
Steps i have followed as follows:
- Created Gulp.js file as below
File: gulpfile.js
// grab our gulp packages
var gulp = require('gulp'),
gutil = require('gulp-util'),
concat = require('gulp-concat-util');
// create a default task and just log a message
gulp.task('default', function() {
return gutil.log('Gulp is running!')
});
gulp.task('scripts', function() {
gulp.src(['./js/*.js'])
.pipe(concat.scripts('all.js'))
.pipe(uglify())
.pipe(gulp.dest('./dist/'))
});
- run
gulp
command.
After running gulp, i am getting message as Gulp is running
as mentioned in file. But Js file is not created.
Any help shall be appreciated.