KNietzsche's avatar

gulp on windows, no output file

Hello, I try to follow https://laracasts.com/lessons/gulp-this I have installed gulp but when I execute the script no file is created

gulpfile.js

var gulp = require('gulp');
var minifycss = require('gulp-minify-css');

gulp.task('css', function(){
    return gulp.src('css/test.css')
    .pipe(minifycss())
    .pipe(gulp.dest('css/min'));
});
D:\Ampps\www\test>gulp css
[08:27:57] Using gulpfile D:\Ampps\www\test\gulpfile.js
[08:27:57] Starting 'css'...
[08:27:57] Finished 'css' after 41 ms

Do you have any idea about how to solve the issue or check if something is missing ? Thanks for your help

0 likes
1 reply
KNietzsche's avatar

I found the issue, so I give my solution here I reinstalled Gulp following the instructions from https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md then I added public/ for my source file and target directory

var gulp = require('gulp');
var minifycss = require('gulp-minify-css');
var notify = require('gulp-notify');

gulp.task('css', function(){
     gulp.src('public/css/test.css')
    .pipe(minifycss())
    .pipe(notify({ message : 'All done'}))
    .pipe(gulp.dest('public/css/min'));
     
});

I can even get the notifications ! Enjoy ! Great video !

Please or to participate in this conversation.