1
0
mirror of https://github.com/github/choosealicense.com synced 2024-06-09 04:37:48 +02:00

Combine javascript files.

Now the main page doesn't include any JS since it doesn't use them. This results in -4 http requests and a lot of bytes saved.
This commit is contained in:
XhmikosR 2013-12-13 11:55:10 +02:00
parent e17bf1d846
commit 3989f02359
10 changed files with 15 additions and 14 deletions

View File

@ -13,18 +13,12 @@
</div>
</footer>
</div><!-- /container -->
</div> <!-- /container -->
<script src="/javascripts/jquery-1.10.2.min.js"></script>
<script src="/javascripts/jquery.qtip.min.js"></script>
{% if page.layout == "license" %}
<script src="/javascripts/ZeroClipboard.min.js"></script>
{% if page.layout == "license" or page.class == "license-types" %}
<script src="/javascripts/javascript.js"></script>
{% endif %}
<script src="/javascripts/annotations.js"></script>
<script src="/javascripts/app.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

View File

@ -1,5 +1,3 @@
---
---
var annotations = {
{% for type_hash in site.rules %}
"{{ type_hash[0] }}": {
@ -8,4 +6,4 @@ var annotations = {
{% endfor %}
}{% if forloop.rindex0 > 0 %},{% endif %}
{% endfor %}
}
};

View File

@ -0,0 +1,9 @@
---
layout: nil
---
{% include js/jquery-1.10.2.min.js %}
{% include js/jquery.qtip.min.js %}
{% include js/ZeroClipboard.min.js %}
{% include js/annotations.js %}
{% include js/app.js %}

View File

@ -3,7 +3,7 @@
set -e
echo "compiling javascript..."
./node_modules/.bin/coffee -c javascripts/app.coffee
./node_modules/.bin/coffee -c _includes/js/app.coffee
echo "building the site..."
bundle exec rake test

View File

@ -3,7 +3,7 @@
set -e
echo "compiling javascript..."
./node_modules/.bin/coffee -c javascripts/app.coffee
./node_modules/.bin/coffee -c _includes/js/app.coffee
echo "spinning up the server..."
bundle exec jekyll serve -w