forked from ultimatemember/ultimatemember
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
115 lines (99 loc) · 3.2 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
Ultimate Member dependencies
*/
var gulp = require('gulp')
, uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
rename = require("gulp-rename");
// task
gulp.task( 'default', function ( done ) {
sass.compiler = require( 'node-sass' );
gulp.src(['assets/sass/*.sass']).pipe( sass().on( 'error', sass.logError ) ).pipe( gulp.dest( 'assets/css' ) );
gulp.src(['assets/js/*.js', '!assets/js/*.min.js', ]) // path to your files
.pipe( uglify() )
.pipe( rename({ suffix: '.min' }) )
.pipe( gulp.dest( 'assets/js/' ) );
done();
});
// function css( path ) {
// sass.compiler = require( 'node-sass' );
//
// var src_array = exclude_css( path );
// return src( src_array )
// .pipe( sass().on( 'error', sass.logError ) )
// .pipe( dest( 'assets/' + path + '/css' ) );
// }
//
// function min_css( path ) {
// sass.compiler = require( 'node-sass' );
//
// var src_array = exclude_css( path );
// return src( src_array )
// .pipe( sass().on( 'error', sass.logError ) )
// .pipe( cleanCSS() )
// .pipe( rename( { suffix: '.min' } ) )
// .pipe( dest( 'assets/' + path + '/css' ) );
// }
/*
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var minifyCSS = require('gulp-minify-css');
gulp.task('scripts', function() {
// Concat and Minify
gulp.src([
'assets/js/select2/select2.full.min.js',
'assets/js/um-modal.js',
'assets/js/um-jquery-form.js',
'assets/js/um-fileupload.js',
'assets/js/pickadate/picker.js',
'assets/js/pickadate/picker.date.js',
'assets/js/pickadate/picker.time.js',
'assets/js/pickadate/legacy.js',
'assets/js/um-raty.js',
'assets/js/um-scrollto.js',
'assets/js/um-scrollbar.js',
'assets/js/um-crop.js',
'assets/js/um-tipsy.js',
'assets/js/um-functions.js',
'assets/js/um-responsive.js',
'assets/js/um-conditional.js',
'assets/js/um-scripts.js',
'assets/js/um-members.js',
'assets/js/um-profile.js',
'assets/js/um-account.js'
])
.pipe(concat("um.min.js"))
.pipe(uglify())
.pipe(gulp.dest("assets/js"));
});
gulp.task('css', function() {
gulp.src([
'assets/css/um-fonticons-ii.css',
'assets/css/um-fonticons-fa.css',
'assets/css/select2/select2.min.css',
'assets/css/um-modal.css',
'assets/css/um-styles.css',
'assets/css/um-members.css',
'assets/css/um-profile.css',
'assets/css/um-account.css',
'assets/css/um-misc.css',
'assets/css/um-fileupload.css',
'assets/css/pickadate/default.css',
'assets/css/pickadate/default.date.css',
'assets/css/pickadate/default.time.css',
'assets/css/um-raty.css',
'assets/css/um-scrollbar.css',
'assets/css/um-crop.css',
'assets/css/um-tipsy.css',
'assets/css/um-responsive.css',
])
.pipe(minifyCSS())
.pipe(concat("um.min.css"))
.pipe(gulp.dest("assets/css"));
});
// The default task (called when you run `gulp`)
gulp.task('default', function() {
gulp.start('scripts');
gulp.start('css');
});*/