-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
29 lines (22 loc) · 1.16 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
const gulp = require('gulp');
const less = require('gulp-less')
const nano = require('gulp-cssnano');
const rename = require('gulp-rename');
const copyFaCss = () => gulp.src('./node_modules/font-awesome/css/*')
.pipe(gulp.dest('./themes/atnartur/source/libs/font-awesome/css/'));
const copyFaFonts = () => gulp.src('./node_modules/font-awesome/fonts/*')
.pipe(gulp.dest('./themes/atnartur/source/libs/font-awesome/fonts/'));
const copyFromNpm = () => gulp.src([
'./node_modules/highlightjs/styles/github.css',
'./node_modules/bootstrap-3-typeahead/bootstrap3-typeahead.min.js',
'./node_modules/bootstrap/dist/css/bootstrap.min.css',
'./node_modules/jquery/dist/jquery.min.js'
]).pipe(gulp.dest('./themes/atnartur/source/libs/'));
const copy = gulp.parallel([copyFaCss, copyFaFonts, copyFromNpm]);
const css = () => gulp.src('themes/atnartur/source/styles/_main.less')
.pipe(less())
.pipe(nano())
.pipe(rename('main.min.css'))
.pipe(gulp.dest('themes/atnartur/source/styles/'));
module.exports.watch = () => gulp.watch('themes/atnartur/source/styles/*.less', gulp.parallel([css]));
module.exports.default = gulp.parallel([css, copy]);