Skip to content

remove jQuery or Zepto dependency #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/plugins/jquery.ajax.js
39 changes: 39 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ var source = require('vinyl-source-stream');
var connect = require('gulp-connect');
var notify = require('gulp-notify');

var uglify = require('gulp-uglify');
var pump = require('pump');

var fs = require('fs');
var builder = require('jquery-custom');

gulp.task('build', function () {
var isDevelopment = process.env.NODE_ENV === 'develop',
browserifyOpts = {
Expand All @@ -26,13 +32,46 @@ gulp.task('build', function () {
.pipe(gulp.dest('./'));
});

gulp.task('compress', function () {
pump([
gulp.src('./quickblox.min.js'),
uglify(),
gulp.dest('./')
]
);
});

gulp.task('connect', function() {
connect.server({
port: 8080,
https: true
});
});

gulp.task('jquery', function () {
return builder({
flags: [
'-deprecated',
'-dimensions',
'-effects',
'-event',
'-event/alias',
'-event/focusin',
'-event/trigger',
'-offset',
'-wrap',
'-core/ready',
'-exports/global',
'-sizzle'
],
}, function (err, compiledContent) {
if (err) return console.error(err);
fs.writeFile('./src/plugins/jquery.ajax.js', compiledContent, function (err) {
if (err) return console.error(err);
Copy link
Contributor

@dimaspirit dimaspirit Nov 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also use notify for notify module about a crash process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure?

})
})
});

gulp.task('watch', function () {
gulp.watch(['./src/**/*.js'], ['build']);
});
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@
"gulp": "^3.9.1",
"gulp-connect": "^5.0.0",
"gulp-notify": "^2.2.0",
"gulp-uglify": "^2.0.0",
"jasmine": "^2.4.1",
"jquery-custom": "^1.1.1",
"jshint": "^2.9.3",
"jshint-stylish": "^2.2.1",
"pump": "^1.0.1",
"vinyl-source-stream": "^1.1.0"
},
"autoupdate": {
Expand Down
Loading