Skip to content

Commit ead86c0

Browse files
Merge pull request #360 from QuickBlox/dev.QBWEBSDK-684
[QBWEBSDK-684] JS SDKs security issues
2 parents d3c11ec + 35a0d41 commit ead86c0

File tree

7 files changed

+3907
-3946
lines changed

7 files changed

+3907
-3946
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
3-
- "4"
4-
3+
- "8.12"
4+
55
branches:
66
only:
77
- gh-pages

gulpfile.js

Lines changed: 10 additions & 21 deletions
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');
9+
var uglify = require('gulp-uglify-es').default;
1010

11-
var uglify = require('gulp-uglify');
12-
var pump = require('pump');
13-
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'));

0 commit comments

Comments
 (0)