Skip to content

Commit 24fb622

Browse files
[QBWEBSDK-684] Fix gulpfile after migrate to [email protected]
1 parent 7cedea9 commit 24fb622

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

gulpfile.js

+9-20
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ var gulp = require('gulp');
55
var browserify = require('browserify');
66
var source = require('vinyl-source-stream');
77

8-
var webserver = require('gulp-webserver');
98
var notify = require('gulp-notify');
10-
119
var uglify = require('gulp-uglify');
12-
var pump = require('pump');
1310

14-
gulp.task('build', function () {
11+
gulp.task('build', function() {
1512
var isDevelopment = process.env.NODE_ENV === 'develop',
1613
browserifyOpts = {
1714
debug: isDevelopment,
@@ -31,26 +28,16 @@ gulp.task('build', function () {
3128
.pipe(notify('Build task is finished.'));
3229
});
3330

34-
gulp.task('minify', function () {
31+
gulp.task('minify', function() {
3532
return gulp.src(['./quickblox.min.js'])
3633
.pipe(uglify())
3734
.on('error', function (err) { console.log('ERROR', err) })
3835
.pipe(gulp.dest('./'));
3936
});
4037

41-
gulp.task('connect', function() {
42-
gulp.src('./')
43-
.pipe(webserver({
44-
host: 'localhost',
45-
https: true,
46-
directoryListing: true,
47-
open: true
48-
}));
49-
});
50-
51-
gulp.task('generate-build_version', function() {
38+
gulp.task('generate-build_version', function(done) {
5239
var fs = require('fs');
53-
const configPath = './src/qbConfig.js';
40+
var configPath = './src/qbConfig.js';
5441

5542
function incBuildNumber(foundedString, p1, buildNumber, p2) {
5643
var oldBuildNumber = +buildNumber;
@@ -68,12 +55,14 @@ gulp.task('generate-build_version', function() {
6855
if (error) {
6956
throw new Error(error);
7057
}
58+
59+
done();
7160
});
7261
});
7362
});
7463

75-
gulp.task('watch', function () {
76-
gulp.watch(['./src/**/*.js'], ['build']);
64+
gulp.task('watch', function() {
65+
gulp.watch(['./src/**/*.js'], gulp.series('build'));
7766
});
7867

79-
gulp.task('default', ['build', 'connect', 'watch']);
68+
gulp.task('default', gulp.series('build', 'watch'));

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
"buildNotMinified": "npm run lint && gulp build",
8888
"generateBuildVersion": "gulp generate-build_version",
8989
"docs": "rimraf docs && mkdir docs && jsdoc -c ./jsdoc.conf.json",
90-
"start": "gulp connect",
9190
"test": "jasmine"
9291
}
9392
}

0 commit comments

Comments
 (0)