Skip to content

Commit

Permalink
added size report
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doherty committed Feb 13, 2018
1 parent 8bc2d8d commit 4cb0f64
Show file tree
Hide file tree
Showing 4 changed files with 4,145 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.MD
Expand Up @@ -2,7 +2,7 @@

[![Shippable branch](https://img.shields.io/shippable/593aa7c6118f370700f9f244/master.svg)](https://app.shippable.com/projects/593aa7c6118f370700f9f244) [![Linked In](https://img.shields.io/badge/Linked-In-blue.svg)](https://www.linkedin.com/in/john-i-doherty) [![Twitter Follow](https://img.shields.io/twitter/follow/MrJohnDoherty.svg?style=social&label=Twitter&style=plastic)](https://twitter.com/MrJohnDoherty)

Adds a `long-press` event to the DOM using pure JavaScript _(no JQuery or other dependencies)_. Works in IE9+, Chrome, Firefox, Safari as well as popular mobile browsers including Cordova _(Phone Gap)_ applications.
A **1.2k** script that adds a `long-press` event to the DOM using pure JavaScript. Works in IE9+, Chrome, Firefox, Safari as well as popular mobile browsers including Cordova _(Phone Gap)_ applications.

Defaults to 1.5 seconds but can be overridden by adding a `data-long-press-delay` attribute to an element.

Expand Down
9 changes: 9 additions & 0 deletions gulpfile.js
Expand Up @@ -6,6 +6,7 @@ var del = require('del');
var runSequence = require('run-sequence');
var replace = require('gulp-string-replace');
var pjson = require('./package.json');
var sizereport = require('gulp-sizereport');

gulp.task('clean', function () {
return del(['dist']);
Expand All @@ -25,10 +26,18 @@ gulp.task('build-js', function () {
.pipe(gulp.dest('dist'));
});

gulp.task('sizereport', function () {
return gulp.src('./dist/*')
.pipe(sizereport({
gzip: true
}));
});

gulp.task('build', function (callback) {
runSequence(
'clean',
'build-js',
'sizereport',
callback
);
});

0 comments on commit 4cb0f64

Please sign in to comment.