💻 gulp-concat: $npm install gulp-concat --save-dev
💻 gulp-rename: $npm install gulp-rename --save-dev
💻 gulp-uglify: $npm install gulp-uglify --save-dev
const gulp = require('gulp'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify');
maps = require('gulp-sourcemaps'),
gulp.task('scripts', () => {
gulp.src([ 'jsFiles' ])
.pipe(maps.init())
.pipe(maps.write('./'))
.pipe(concat('app.js'))
.pipe(gulp.dest(jsDest))
.pipe(rename('scripts.min.js'))
.pipe(uglify())
.pipe(gulp.dest(jsDest));
});
💻 Gulp Sass plugin: $npm install gulp-sass --save-dev
💻 Gulp sourcemaps: $npm install gulp-sourcemaps --save-dev
const gulp = require('gulp'),
sass = require('gulp-sass'),
maps = require('gulp-sourcemaps'),
gulp.task('compileSass', () => {
gulp.src([ 'scssFiles' ])
.pipe(maps.init())
.pipe(sass())
.pipe(maps.write('./'))
.pipe(gulp.dest('css'));
});