Change global outputs' names to just perfect-scrollbar
.
This commit is contained in:
parent
ab40b55c8f
commit
7a8b47179c
17
gulpfile.js
17
gulpfile.js
@ -38,8 +38,12 @@ function browserified() {
|
|||||||
gulp.task('js', ['clean:js'], function () {
|
gulp.task('js', ['clean:js'], function () {
|
||||||
return gulp.src('./src/js/adaptor/*.js')
|
return gulp.src('./src/js/adaptor/*.js')
|
||||||
.pipe(browserified())
|
.pipe(browserified())
|
||||||
.pipe(rename({
|
.pipe(rename(function (path) {
|
||||||
prefix: 'perfect-scrollbar.'
|
if (path.basename === 'global') {
|
||||||
|
path.basename = 'perfect-scrollbar';
|
||||||
|
} else {
|
||||||
|
path.basename = 'perfect-scrollbar.' + path.basename;
|
||||||
|
}
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('./out/js'))
|
.pipe(gulp.dest('./out/js'))
|
||||||
.pipe(connect.reload());
|
.pipe(connect.reload());
|
||||||
@ -49,9 +53,12 @@ gulp.task('js:min', ['clean:js:min'], function () {
|
|||||||
return gulp.src('./src/js/adaptor/*.js')
|
return gulp.src('./src/js/adaptor/*.js')
|
||||||
.pipe(browserified())
|
.pipe(browserified())
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.pipe(rename({
|
.pipe(rename(function (path) {
|
||||||
prefix: 'perfect-scrollbar.',
|
if (path.basename === 'global') {
|
||||||
suffix: '.min'
|
path.basename = 'perfect-scrollbar.min';
|
||||||
|
} else {
|
||||||
|
path.basename = 'perfect-scrollbar.' + path.basename + '.min';
|
||||||
|
}
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('./out/js/min'));
|
.pipe(gulp.dest('./out/js/min'));
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user