Gulp 4.0

const {
    src,
    dest,
    parallel,
    series,
    watch
} = require('gulp');


var sass = require('gulp-sass')(require('sass'));;
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var cleanCSS = require('gulp-clean-css');
var uglify = require('gulp-uglify');
var rename = require("gulp-rename");
var livereload = require("gulp-livereload");

var paths = {
  scripts: ['dev/js/**/*.js'],
  styles: 'dev/scss/**/*.scss', 
  styles_dest: 'assets/css/', 
  minified_css: ['assets/css/style.css', 'assets/css/home.css'],
  images: 'client/img/**/*'
};

function styles() {
    return src(paths.styles)    // 指定要處理的 Scss 檔案目錄
        .pipe(sass({
        	includePaths: ['dev/scss'], 
        	sourceComments: true
        }).on('error', sass.logError)) // 編譯 Scss
        .pipe(dest(paths.styles_dest));  // 指定編譯後的 css 檔案目錄
};

function minify_css() {
	return src(paths.minified_css)
		.pipe(sourcemaps.init())
		.pipe(cleanCSS({
			keepBreaks: false
		}))
		.pipe(rename(function(path){
			path.basename += ".min";
			path.extname = ".css";
		}))
		.pipe(sourcemaps.write('.'))
		.pipe(dest(paths.styles_dest))
		.pipe(livereload());
};

function minify_js() {
	return src(paths.scripts)
		.pipe(uglify())
		.pipe(rename(function(path){
			path.basename += '.min';
			path.extname = '.js';
		}))
		.pipe(dest('assets/js/'));
};

//task "watch" must be added in default task list
function watch_files() {
	//livereload.listen();
	watch(paths.scripts, minify_js);
	watch(paths.styles, styles, minify_css);
};


exports.watch = parallel(watch_files);
exports.default = series(styles, parallel(minify_css, minify_js));

Commands

gulp
gulp -v
gulp watch

package.json

{
  "name": "Buy-Helper",
  "version": "1.0.0",
  "description": "",
  "main": "gulpfile.js",
  "scripts": {
    "test": "test-app"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "gulp": "^4.0.2",
    "gulp-clean-css": "^4.3.0",
    "gulp-concat": "^2.6.0",
    "gulp-livereload": "^4.0.0",
    "gulp-rename": "^2.0.0",
    "gulp-sass": "^5.0.0",
    "gulp-sourcemaps": "^3.0.0",
    "gulp-uglify": "^3.0.0"
  },
  "dependencies": {
    "sass": "^1.42.1"
  }
}