• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

18F / hub / 1180 / 1
77%
18f-pages-internal: 78%

Build:
Build:
LAST BUILD BRANCH: master
DEFAULT BRANCH: 18f-pages-internal
Ran 03 May 2015 07:19PM UTC
Files 34
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 May 2015 07:14PM UTC coverage: 75.0%. First build
2.1.5

push

travis-ci

mbland
Plugin to compress Javascript files

Since asynchronous loading was introduced in #260 and #262, we lost the
Javascript compression for most scripts provided by jekyll-assets. This plugin
compresses all of the Javascript assets under `assets/js` that aren't already
compressed (i.e. end in `.min.js`).

The performance impact on `localhost:4000` may not be noticeably
earth-shattering, but appears favorable, especially in terms of earlier
DOMContentLoaded (blue line) and Window Load (red line) events.

In terms of the difference in file sizes across all scripts, there's an 82.3%
reduction:

```
$ find assets -type f -name '*.js' | grep -v '\.min\.js' | xargs ls -l | awk
'{SUM+=$5} END {print SUM}'
1029992

$ find _compressed -type f -name '*.js' | grep -v '\.min\.js' | xargs ls -l |
awk '{SUM+=$5} END {print SUM}'
182786

$ python -c 'print 182786 / 1029992.0'
0.17746351428
```

The biggest file, angular.js, is 85.6% smaller:

```
$ ls -l angular*.js
-rw-r--r--  1 _ _  113536 May  3 14:35 angular-compressed.js
-rw-r--r--  1 _ _  789267 May  3 14:35 angular.js

$ python -c 'print 113536/789267.0'
0.143849926577
```

Using command-line gzip to approximate webserver compression, compressing the
pre-compressed Javascript is still a significant win (78.8% smaller):

```
$ gzip angular*.js
$ ls -l angular*.js.gz
-rw-r--r--  1 _ _   41638 May  3 14:35 angular-compressed.js.gz
-rw-r--r--  1 _ _  196728 May  3 14:35 angular.js.gz

$ python -c 'print 41638/196728.0'
0.211652637144
```

687 of 916 relevant lines covered (75.0%)

3.61 hits per line

Source Files on job 1180.1 (2.1.5)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1180
  • Travis Job 1180.1
  • 7411886a on github
  • Next Job for 2.1.5 on js-compressor (#1183.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc