mirror of
https://github.com/kremalicious/blog.git
synced 2024-12-02 06:07:09 +01:00
combine almost all js into one file, load all async
This commit is contained in:
parent
878b186f7c
commit
af6f6e5467
@ -54,8 +54,7 @@
|
|||||||
</section>
|
</section>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="/assets/js/jquery.min.js"></script>
|
<script src="/assets/js/kremalicious3.min.js" async></script>
|
||||||
<script src="/assets/js/kremalicious3.min.js"></script>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<script>try{Typekit.load();}catch(e){}</script>
|
<script>try{Typekit.load();}catch(e){}</script>
|
||||||
|
|
||||||
<!-- Picturefill -->
|
<!-- Picturefill -->
|
||||||
<script src="/assets/js/picturefill.min.js" defer></script>
|
<script src="/assets/js/picturefill.min.js" async></script>
|
||||||
|
|
||||||
<!-- Canonical URL -->
|
<!-- Canonical URL -->
|
||||||
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">
|
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">
|
||||||
|
@ -159,10 +159,9 @@ gulp.task('css', function() {
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
gulp.task('js-libraries', function() {
|
gulp.task('js-libraries', function() {
|
||||||
var jquery = gulp.src('node_modules/jquery/dist/jquery.js'),
|
var picturefill = gulp.src('node_modules/picturefill/dist/picturefill.js');
|
||||||
picturefill = gulp.src('node_modules/picturefill/dist/picturefill.js');
|
|
||||||
|
|
||||||
return merge(jquery, picturefill)
|
return merge(picturefill)
|
||||||
.pipe($.uglify())
|
.pipe($.uglify())
|
||||||
.pipe($.rename({
|
.pipe($.rename({
|
||||||
suffix: '.min'
|
suffix: '.min'
|
||||||
@ -175,6 +174,7 @@ gulp.task('js-project', function() {
|
|||||||
return gulp.src([
|
return gulp.src([
|
||||||
'node_modules/webcomponents.js/CustomElements.js',
|
'node_modules/webcomponents.js/CustomElements.js',
|
||||||
'node_modules/svg4everybody/svg4everybody.js',
|
'node_modules/svg4everybody/svg4everybody.js',
|
||||||
|
'node_modules/jquery/dist/jquery.js',
|
||||||
'node_modules/masonry-layout/dist/masonry.pkgd.js',
|
'node_modules/masonry-layout/dist/masonry.pkgd.js',
|
||||||
'node_modules/imagesloaded/imagesloaded.js',
|
'node_modules/imagesloaded/imagesloaded.js',
|
||||||
'bower_components/simple-jekyll-search/dest/jekyll-search.js',
|
'bower_components/simple-jekyll-search/dest/jekyll-search.js',
|
||||||
|
Loading…
Reference in New Issue
Block a user