Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 444aeec

Browse files
committed
Merge pull request #1238 from anilanar/gulp-sourcemaps
chore(souremaps): generate sourcemaps
2 parents 852f874 + 50d7e0d commit 444aeec

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

gulpfile.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ gulp.task('scripts', ['clean'], function() {
6464
timestamp: (new Date()).toISOString(), pkg: config.pkg
6565
}))
6666
.pipe(gulp.dest('dist'))
67+
.pipe($.sourcemaps.init())
6768
.pipe($.uglify({preserveComments: 'some'}))
68-
.pipe($.rename({ext:'.min.js'}))
69+
.pipe($.concat('select.min.js'))
70+
.pipe($.sourcemaps.write('./'))
6971
.pipe(gulp.dest('dist'));
7072

7173
});
@@ -76,10 +78,12 @@ gulp.task('styles', ['clean'], function() {
7678
.pipe($.header(config.banner, {
7779
timestamp: (new Date()).toISOString(), pkg: config.pkg
7880
}))
79-
.pipe($.rename('select.css'))
81+
.pipe($.concat('select.css'))
8082
.pipe(gulp.dest('dist'))
83+
.pipe($.sourcemaps.init())
8184
.pipe($.minifyCss())
82-
.pipe($.rename({ext:'.min.css'}))
85+
.pipe($.concat('select.min.css'))
86+
.pipe($.sourcemaps.write('./', {debug: true}))
8387
.pipe(gulp.dest('dist'));
8488

8589
});
@@ -153,4 +157,4 @@ gulp.task('bump', function(done) {
153157
var handleError = function (err) {
154158
console.log(err.toString());
155159
this.emit('end');
156-
};
160+
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"gulp-angular-templatecache": "~1.2.1",
2222
"gulp-bump": "^1.0.0",
2323
"gulp-conventional-changelog": "^0.7.0",
24-
"gulp-concat": "~2.1.7",
24+
"gulp-concat": "^2.6.0",
2525
"gulp-git": "^1.4.0",
2626
"gulp-header": "~1.0.2",
2727
"gulp-footer": "~1.0.5",
@@ -30,7 +30,7 @@
3030
"gulp-minify-css": "~0.3.6",
3131
"gulp-minify-html": "~0.1.0",
3232
"gulp-plumber": "^0.6.3",
33-
"gulp-rename": "~0.2.2",
33+
"gulp-sourcemaps": "^1.6.0",
3434
"gulp-tag-version": "^1.3.0",
3535
"gulp-uglify": "~0.3.1",
3636
"gulp-util": "^2.2.19",

0 commit comments

Comments
 (0)