-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
54 lines (47 loc) · 1.62 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const gulp = require('gulp');
const concat = require('gulp-concat');
const cleanCSS = require('gulp-clean-css');
const uglify = require('gulp-uglify');
const imagemin = require('gulp-imagemin');
const rename = require('gulp-rename');
const sourcemaps = require('gulp-sourcemaps');
const purgeSourcemaps = require('gulp-purge-sourcemaps');
const cssDest = 'assets/lib/css';
function fontAwesome(){
return gulp.src('node_modules/@fortawesome/fontawesome-free/webfonts/*-solid-*.*')
.pipe(gulp.dest('assets/lib/webfonts'));
}
function css() {
return gulp.src(['node_modules/@fortawesome/fontawesome-free/css/all.css'])
.pipe(rename('fontAwesome.css'))
.pipe(gulp.src([
'node_modules//bootstrap//dist//css//bootstrap.css'
]))
//.pipe(concat('styles.css'))
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(purgeSourcemaps())
.pipe(gulp.dest(cssDest))
.pipe(concat('all.min.css'))
.pipe(cleanCSS())
.pipe(gulp.dest(cssDest));
}
function js() {
return gulp.src([
'node_modules/@popperjs/core/dist/umd/popper.js',
'node_modules/bootstrap/dist/js/bootstrap.js',
'node_modules/jquery/dist/jquery.js'
])
//.pipe(concat('scripts.min.js'))
//.pipe(uglify())
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(purgeSourcemaps())
.pipe(gulp.dest('assets/lib/js'));
}
// function img() {
// return gulp.src('assets/img/*')
// .pipe(imagemin([
// imagemin.mozjpeg({optimizationLevel: 5})
// ]))
// .pipe(gulp.dest('dist-gulp/img'));
// }
exports.default = gulp.parallel(css,js,fontAwesome);