Gulp generating .min file on local but not on server

85 views Asked by At

I am running below code to generate '.min' file on local and its working fine but it does not work on the server. Is something wrong in the code?

var fs = require('fs'),
    es = require('event-stream'),
    gulp = require('gulp'),
    compass = require('gulp-compass'),
    concat = require('gulp-concat'),
    jshint = require('gulp-jshint'),
    scsslint = require('gulp-scsslint'),
    sourcemaps = require('gulp-sourcemaps'),
    uglify = require('gulp-uglify');
    minifyCSS = require('gulp-minify-css');

JavaScript Tasks:

gulp.task('javascript', function(){
   gulp.src('js/animation.js')
   .pipe(concat('js/animation.min.js'))
   .pipe(uglify())
   .pipe(gulp.dest(''));
});

gulp.task('style', function(){
   gulp.src(['css/transition.css'])
   .pipe(concat('css/transition.min.css'))
   .pipe(minifyCSS())
   .pipe(gulp.dest(''));
});

Watch Files:

gulp.task('watch', ['build'], function() {
    gulp.watch(['css/transition.css'], ['style']);
    gulp.watch(['js/animation.js'], ['javascript']);
});

Task Bundles:

gulp.task('build', [
    'css','js'
]);

gulp.task('default', ['watch','build']);
0

There are 0 answers