[devdocsgjs/main: 702/1867] Fix Docker images, sprites:generate and a favicon cors issue




commit 5dbb8536069b2956f9c733e627989e6806eb94e3
Author: Jasper van Merle <jaspervmerle gmail com>
Date:   Sun Aug 4 02:50:19 2019 +0200

    Fix Docker images, sprites:generate and a favicon cors issue

 Dockerfile                            | 2 +-
 Dockerfile-alpine                     | 2 +-
 assets/javascripts/lib/favicon.coffee | 1 +
 lib/tasks/sprites.thor                | 2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index f59628c7..b033427a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,7 +6,7 @@ ENV ENABLE_SERVICE_WORKER=true
 WORKDIR /devdocs
 
 RUN apt-get update && \
-    apt-get -y install git nodejs && \
+    apt-get -y install git nodejs libcurl4 && \
     gem install bundler && \
     rm -rf /var/lib/apt/lists/*
 
diff --git a/Dockerfile-alpine b/Dockerfile-alpine
index b916d2b1..33a06b0e 100644
--- a/Dockerfile-alpine
+++ b/Dockerfile-alpine
@@ -7,7 +7,7 @@ WORKDIR /devdocs
 
 COPY . /devdocs
 
-RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev && \
+RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev libcurl && \
     gem install bundler && \
     bundle install --system --without test && \
     thor docs:download --all && \
diff --git a/assets/javascripts/lib/favicon.coffee b/assets/javascripts/lib/favicon.coffee
index f42b1281..176bd79c 100644
--- a/assets/javascripts/lib/favicon.coffee
+++ b/assets/javascripts/lib/favicon.coffee
@@ -9,6 +9,7 @@ withImage = (url, action) ->
     action(imageCache[url])
   else
     img = new Image()
+    img.crossOrigin = 'anonymous'
     img.src = url
     img.onload = () =>
       imageCache[url] = img
diff --git a/lib/tasks/sprites.thor b/lib/tasks/sprites.thor
index ca4e33bf..1c0d3600 100644
--- a/lib/tasks/sprites.thor
+++ b/lib/tasks/sprites.thor
@@ -31,6 +31,8 @@ class SpritesCLI < Thor
       item[:dark_icon_fix] = needs_dark_icon_fix(item[:icon_32], bg_color)
     end
 
+    return unless items_with_icons.length > 0
+
     log_details(items_with_icons, icons_per_row)
 
     generate_spritesheet(16, items_with_icons, 'assets/images/sprites/docs.png') {|item| item[:icon_16]}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]