forked from janpantel/angular-sails
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
23 lines (19 loc) · 689 Bytes
/
gulpfile.js
File metadata and controls
23 lines (19 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
header = require('gulp-header'),
footer = require('gulp-footer');
gulp.task('build-js', function () {
gulp.src(['src/ngSails.js', 'src/**/*.js'])
.pipe(concat('angular-sails.js'))
.pipe(header('(function (angular, io) {\n\'use strict\''))
.pipe(footer('}(angular, io));'))
.pipe(gulp.dest('./dist/'))
.pipe(concat('angular-sails.min.js'))
.pipe(uglify())
.pipe(gulp.dest('./dist/'));
});
gulp.task('watch', function () {
gulp.watch('src/**/*.js', ['build-js']);
});
gulp.task('default', ['build-js', 'watch']);