forked from newraina/typecho-theme-NexTPisces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
53 lines (48 loc) · 1.43 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
var gulp = require('gulp');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var minifycss = require('gulp-minify-css');
var concat = require('gulp-concat');
var order = require("gulp-order");
gulp.task('mainScript', function() {
gulp.src(['src/js/src/*.js', 'src/js/src/schemes/*.js'])
.pipe(order([
'motion.js',
'jutils.js',
'bootstrap.js',
'affix.js',
'schemes/*.js'
]))
.pipe(concat('main.js'))
.pipe(gulp.dest('dist/js'))
.pipe(uglify())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('dist/js'))
});
gulp.task('postScript', function() {
gulp.src('src/js/src_post/*.js')
.pipe(concat('postNeed.js'))
.pipe(gulp.dest('dist/js'))
.pipe(uglify())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('dist/js'))
});
gulp.task('mainCss', function() {
gulp.src(['src/css/*.css','vendors/font-awesome/css/font-awesome.min.css'])
.pipe(concat('main.css'))
.pipe(gulp.dest('dist/css'))
.pipe(minifycss())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('dist/css'))
});
gulp.task('copyFont', function() {
gulp.src(['vendors/font-awesome/fonts/*.*'])
.pipe(gulp.dest('dist/fonts'))
});
gulp.task('default', ['mainScript', 'postScript', 'mainCss', 'copyFont']);