-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
27 lines (23 loc) · 857 Bytes
/
gulpfile.js
File metadata and controls
27 lines (23 loc) · 857 Bytes
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
var gulp = require('gulp'),
notify = require('gulp-notify'),
sass = require('gulp-ruby-sass'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat');
gulp.task('js', function() {
gulp.src('assets/js/*.js')
.pipe(concat('jquery.plugin.min.js'))
.pipe(uglify({ preserveComments: 'some' }))
.pipe(gulp.dest('assets/build'))
.pipe(notify({ message: 'Scripts are updated' }));
});
gulp.task('sass', function(){
return sass('assets/sass/style.scss', { style: 'compressed' })
.pipe(concat('plugin.min.css'))
.pipe(gulp.dest('assets/build'))
.pipe(notify({ message: 'Styles are updated' }));
});
gulp.task('watch', function(){
gulp.watch('assets/sass/**/*.scss', ['sass']);
gulp.watch('assets/js/*.js', ['js']);
});
gulp.task('default', ['js', 'sass', 'watch']);