title: How to watch sass and javascript at the same time in gulp 4
body: <p>I am trying to convert my sass to compressed-css and javascript to uglified-js. And <code>watch</code> both scss and js changes</p>
  
  <p>my code is working but when I tried saving a js file, it goes into a unstoppable loop.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var gulp = require('gulp');
  var sass = require('gulp-sass');    
  var uglify = require('gulp-uglify');
  var concat = require('gulp-concat');
  
  gulp.task('sass', function(done){
  
      gulp.src('public/sass/**/*.scss')
        .pipe(sass({outputStyle: 'compressed'})) // Using gulp-sass
        .pipe(gulp.dest('public/stylesheets'))
  
        done();
    });
  
  gulp.task('scripts', function(done){
  
      gulp.src('public/javascripts/**/*.js')
          .pipe(concat('scripts.js'))
          .pipe(uglify())
          .pipe(gulp.dest('public/javascripts'))
  
          done();
  });
  
  
    gulp.task('watch', function(){
          //I made .scss and .js into an array so they will both be watched
      gulp.watch(['public/sass/**/*.scss', 'public/javascripts/**/*.js' ], gulp.series('sass', 'scripts', function(done) {
  
  
          done();
        }))
    })
  </code></pre>
  
  <p>Now when I run <code>gulp watch</code> it is working but then when I save a js file, I goes into a saving loop, It's saves and saves and saves nonstop.</p>
  
  <p>I have made scss work with this code </p>
  
  <pre><code> gulp.task('watch', function(){
      gulp.watch('public/sass/**/*.scss', gulp.series('sass', 'scripts', function(done) {
  
  
          done();
        }))
    })
  </code></pre>
  
  <p>But I have no idea how I can make .js files be watched. </p>
  
  <p>I searched google for possible answer but only find the older version solution. Is there a way I can do this with gulp4?</p>
  
  <ul>
  <li>I also tried <code>gulp.parallel</code> but it still looped</li>
  </ul>
  
  <p>Please help. Thanks</p>