Skip to content

Commit f9fd6b8

Browse files
Michael StramelMichael Stramel
Michael Stramel
authored and
Michael Stramel
committed
Update gulp tasks to output both unminified and minified in one file.
1 parent e60dca0 commit f9fd6b8

File tree

5 files changed

+18
-25
lines changed

5 files changed

+18
-25
lines changed

gulp/tasks/bootstrap.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var gulp = require('gulp'),
33
minifyHtml = require('gulp-minify-html'),
44
templateCache = require('gulp-angular-templatecache'),
55
concat = require('gulp-concat'),
6+
rename = require('gulp-rename'),
67
uglify = require('gulp-uglify');
78

89
gulp.task('bootstrap', function() {
@@ -22,8 +23,10 @@ gulp.task('bootstrap', function() {
2223
stream.queue(gulp.src('./src/directives/decorators/bootstrap/*.js'));
2324

2425
stream.done()
25-
.pipe(concat('bootstrap-decorator.min.js'))
26+
.pipe(concat('bootstrap-decorator.js'))
27+
.pipe(gulp.dest('./dist/'))
2628
.pipe(uglify())
29+
.pipe(rename('bootstrap-decorator.min.js'))
2730
.pipe(gulp.dest('./dist/'));
2831

29-
});
32+
});

gulp/tasks/default.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ var gulp = require('gulp');
33
gulp.task('default', [
44
'minify',
55
'bootstrap',
6-
'bootstrap-datepicker',
7-
'non-minified-dist'
8-
]);
6+
'bootstrap-datepicker'
7+
]);

gulp/tasks/minify.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var gulp = require('gulp'),
22
concat = require('gulp-concat'),
3+
rename = require('gulp-rename'),
34
uglify = require('gulp-uglify');
45

56
gulp.task('minify', function() {
@@ -9,7 +10,9 @@ gulp.task('minify', function() {
910
'./src/services/*.js',
1011
'./src/directives/*.js'
1112
])
12-
.pipe(concat('schema-form.min.js'))
13+
.pipe(concat('schema-form.js'))
14+
.pipe(gulp.dest('./dist/'))
1315
.pipe(uglify())
16+
.pipe(rename('schema-form.min.js'))
1417
.pipe(gulp.dest('./dist/'));
1518
});

gulp/tasks/non-minified-dist.js

-13
This file was deleted.

package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"gulp-concat": "^2.2.0",
3838
"gulp-jscs": "^1.1.0",
3939
"gulp-minify-html": "^0.1.1",
40+
"gulp-rename": "^1.2.0",
4041
"gulp-uglify": "^0.2.1",
4142
"karma": "^0.12.0",
4243
"karma-chai-sinon": "^0.1.3",
@@ -51,10 +52,10 @@
5152
"sinon-chai": "^2.5.0",
5253
"streamqueue": "0.0.5"
5354
},
54-
"licenses": [
55-
{
56-
"type": "MIT",
57-
"url": "https://raw.githubusercontent.com/Textalk/angular-schema-form/master/LICENSE"
58-
}
59-
]
55+
"licenses": [
56+
{
57+
"type": "MIT",
58+
"url": "https://raw.githubusercontent.com/Textalk/angular-schema-form/master/LICENSE"
59+
}
60+
]
6061
}

0 commit comments

Comments
 (0)