-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
40 lines (35 loc) · 1.15 KB
/
gulpfile.js
File metadata and controls
40 lines (35 loc) · 1.15 KB
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
// including plugins
var gulp = require('gulp')
, uglify = require("gulp-uglify")
, concat = require("gulp-concat")
, Server = require('karma').Server;
// task
gulp.task('minify-js', function () {
gulp.src('./src/**/*.js') // path to your files
.pipe(uglify())// minify and strip comments from the code"
.pipe(concat('angular-jwt.min.js')) // concat and name it
.pipe(gulp.dest('./'));
});
gulp.task('concat-js', function () {
gulp.src('./src/**/*.js') // path to your files
.pipe(concat('angular-jwt.js')) // concat and name it "concat.js"
.pipe(gulp.dest('./'));
});
gulp.task('build-js', function () {
gulp.src('./src/**/*.js') // path to your files
.pipe(uglify())// minify and strip comments from the code"
.pipe(concat('angular-jwt.min.js')) // concat and name it
.pipe(gulp.dest('./'));
gulp.src('./src/**/*.js') // path to your files
.pipe(concat('angular-jwt.js')) // concat and name it "concat.js"
.pipe(gulp.dest('./'));
});
/**
* Run test once and exit
*/
gulp.task('test', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done).start();
});