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

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

Build:
Build:
LAST BUILD BRANCH: master
DEFAULT BRANCH: 18f-pages-internal
Ran 03 May 2015 07:19PM UTC
Jobs 1
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

pending completion
1180

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

Jobs
ID Job ID Ran Files Coverage
1 1180.1 (2.1.5) 03 May 2015 07:19PM UTC 0
75.0
Travis Job 1180.1
Source Files on build 1180
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1180
  • 7411886a on github
  • Next Build on js-compressor (#1183)
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