1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-29 23:48:11 +01:00

combine almost all js into one file, load all async

This commit is contained in:
Matthias Kretschmann 2015-06-10 14:45:27 +02:00
parent 878b186f7c
commit af6f6e5467
3 changed files with 5 additions and 6 deletions

View File

@ -54,8 +54,7 @@
</section>
</footer>
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/kremalicious3.min.js"></script>
<script src="/assets/js/kremalicious3.min.js" async></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

View File

@ -63,7 +63,7 @@
<script>try{Typekit.load();}catch(e){}</script>
<!-- Picturefill -->
<script src="/assets/js/picturefill.min.js" defer></script>
<script src="/assets/js/picturefill.min.js" async></script>
<!-- Canonical URL -->
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">

View File

@ -159,10 +159,9 @@ gulp.task('css', function() {
// Libraries
gulp.task('js-libraries', function() {
var jquery = gulp.src('node_modules/jquery/dist/jquery.js'),
picturefill = gulp.src('node_modules/picturefill/dist/picturefill.js');
var picturefill = gulp.src('node_modules/picturefill/dist/picturefill.js');
return merge(jquery, picturefill)
return merge(picturefill)
.pipe($.uglify())
.pipe($.rename({
suffix: '.min'
@ -175,6 +174,7 @@ gulp.task('js-project', function() {
return gulp.src([
'node_modules/webcomponents.js/CustomElements.js',
'node_modules/svg4everybody/svg4everybody.js',
'node_modules/jquery/dist/jquery.js',
'node_modules/masonry-layout/dist/masonry.pkgd.js',
'node_modules/imagesloaded/imagesloaded.js',
'bower_components/simple-jekyll-search/dest/jekyll-search.js',