-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
35 lines (29 loc) · 1.03 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var gulp = require('gulp');
const autoprefixer = require('gulp-autoprefixer');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
gulp.task('log', function() {
console.log("hey there am using gulp for running task")
})
gulp.task('prefix', () =>
gulp.src('./src/styles/app.css')
.pipe(autoprefixer({
browsers: ['last 99 versions'],
cascade: false
}))
.pipe(gulp.dest('./dist/style/'))
);
gulp.task('conc', function() {
return gulp.src(['./node_modules/jquery/dist/jquery.min.js', './node_modules/aos/dist/aos.js', './node_modules/bootstrap/dist/js/bootstrap.min.js'])
.pipe(concat('./src/scripts/libs.conc.js'))
.pipe(gulp.dest('./'))
});
gulp.task('build', function() {
return gulp.src(['./src/scripts/libs.conc.js', './src/scripts/mainScript.js'])
.pipe(concat('app.js'))
.pipe(gulp.dest('./dist/script/'))
.pipe(rename('app.min.js'))
.pipe(uglify())
.pipe(gulp.dest('./dist/script/'))
})