-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Gulpfile.js
70 lines (59 loc) · 2.02 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
const { series, parallel, src, dest } = require('gulp')
var gulp = require('gulp')
var sass = require('gulp-sass')
sass.compiler = require('node-sass')
var del = require('del')
var browserSync = require("browser-sync").create();
function clean() {
return del('static/**')
}
function maniwani_css() {
return src('./scss/themes/*/theme-*.scss').pipe(
sass({outputStyle: 'compressed',
includePaths: ['./node_modules/bootstrap/scss', './scss/base']}).on('error', sass.logError)).pipe(
dest('./static/css/')).pipe(browserSync.stream())
}
function popper() {
return src('./node_modules/popper.js/dist/umd/popper.min.js').pipe(
dest('./static/popperjs/umd'))
}
function jquery() {
return src('./node_modules/jquery/dist/jquery.min.js').pipe(
dest('./static/jquery/'))
}
function imagesloaded() {
return src('./node_modules/imagesloaded/imagesloaded.pkgd.min.js').pipe(
dest('./static/imagesloaded/'))
}
function masonry() {
return src('./node_modules/masonry-layout/dist/masonry.pkgd.min.js').pipe(
dest('./static/masonry/'))
}
function bootstrap_js() {
return src('./node_modules/bootstrap/dist/js/bootstrap.min.js').pipe(
dest('./static/bootstrap/'))
}
function fontawesome_css() {
return src('./node_modules/@fortawesome/fontawesome-free/css/all.min.css').pipe(
dest('./static/fontawesome/'))
}
function fontawesome_webfonts() {
return src('./node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.+(ttf|woff|woff2)').pipe(
dest('./static/webfonts/'))
}
function watch() {
browserSync.init
({
proxy: '127.0.0.1:5000',
port: 5000
});
gulp.watch('./scss/**/*.scss', maniwani_css ).on('change', browserSync.reload);
gulp.watch("./templates/*.html").on("change", browserSync.reload);
}
exports.watch = watch
exports.clean = clean
exports.css = parallel(maniwani_css, fontawesome_css)
exports.fonts = fontawesome_webfonts
exports.js = parallel(popper, jquery, bootstrap_js, imagesloaded, masonry)
exports.build = series(clean, parallel(exports.css, exports.js, exports.fonts))
exports.default = exports.build