forked from processwire-recipes/processwire-recipes.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (34 loc) · 1.07 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
var projectname = "pwr",
template_path = "site/templates/",
gulp = require('gulp'),
uglify = require('gulp-uglify'),
sass = require('gulp-ruby-sass'),
watch = require('gulp-watch'),
autoprefixer = require('gulp-autoprefixer'),
jshint = require('gulp-jshint'),
concat = require('gulp-concat');
gulp.task('js', function () {
return gulp.src([
template_path + 'js/lib/jquery-2.1.1.min.js',
template_path + 'js/lib/highlight.js',
template_path + 'js/app/main.js'
])
.pipe(uglify())
.pipe(concat(projectname + '.js'))
.pipe(gulp.dest(template_path + 'build/js'));
});
gulp.task('sass', function() {
return gulp.src(template_path + 'sass/*.scss')
.pipe(sass({
style: 'compressed',
lineNumbers: false
}))
.pipe(autoprefixer("last 2 version", "ie 9"))
.pipe(concat(projectname + '.css'))
.pipe(gulp.dest(template_path + 'build/css'));
});
gulp.task('watch', ['sass', 'js'], function() {
gulp.watch(template_path + 'sass/**/*.scss', ['sass']);
gulp.watch(template_path + 'js/**/*.js', ['js']);
});
gulp.task('build', ['sass', 'js']);