forked from slively/ng-context-menu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (33 loc) · 990 Bytes
/
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 gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
connect = require('gulp-connect');
gulp.task('default', ['js', 'lint', 'connect'], function () {
gulp.watch('src/**/*.js', function (event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
});
});
gulp.task('lint', function () {
gulp.src('src/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('js', function () {
gulp.src('src/**/*.js')
.pipe(concat('ng-context-menu.js'))
.pipe(gulp.dest('dist'))
.pipe(uglify())
.pipe(rename('ng-context-menu.min.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('connect', function() {
gulp.watch(['public/**/*', 'index.html'], function() {
gulp.src(['public/**/*', 'index.html'])
.pipe(connect.reload());
});
connect.server({
livereload: true
});
});