Skip to content

Commit

Permalink
Favicon generator: replace realfavicon with favicons package
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev committed Oct 23, 2024
1 parent 49bfade commit 5df383f
Show file tree
Hide file tree
Showing 25 changed files with 1,298 additions and 171 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules_linux

playwright/envs.js
deploy/tools/envs-validator/index.js
deploy/tools/favicon-generator/index.js
deploy/tools/feature-reporter/build/**
deploy/tools/feature-reporter/index.js
public/**
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ WORKDIR /envs-validator
COPY ./deploy/tools/envs-validator/package.json ./deploy/tools/envs-validator/yarn.lock ./
RUN yarn --frozen-lockfile

### FAVICON GENERATOR
# Install dependencies
WORKDIR /favicon-generator
COPY ./deploy/tools/favicon-generator/package.json ./deploy/tools/favicon-generator/yarn.lock ./
RUN yarn --frozen-lockfile


# *****************************
# ****** STAGE 2: Build *******
Expand Down Expand Up @@ -77,6 +83,11 @@ COPY --from=deps /envs-validator/node_modules ./deploy/tools/envs-validator/node
RUN cd ./deploy/tools/envs-validator && yarn build


### FAVICON GENERATOR
# Copy dependencies and source code
COPY --from=deps /favicon-generator/node_modules ./deploy/tools/favicon-generator/node_modules
COPY ./deploy/tools/favicon-generator ./deploy/tools/favicon-generator

# *****************************
# ******* STAGE 3: Run ********
# *****************************
Expand All @@ -102,6 +113,7 @@ COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/deploy/tools/envs-validator/index.js ./envs-validator.js
COPY --from=builder /app/deploy/tools/feature-reporter/index.js ./feature-reporter.js
# COPY /app/deploy/tools/favicon-generator/index.js ./favicon-generator.js

# Copy scripts
## Entripoint
Expand All @@ -113,7 +125,7 @@ COPY --chmod=755 ./deploy/scripts/make_envs_script.sh .
COPY --chmod=755 ./deploy/scripts/download_assets.sh .
## Favicon generator
COPY --chmod=755 ./deploy/scripts/favicon_generator.sh .
COPY ./deploy/tools/favicon-generator ./deploy/tools/favicon-generator
COPY --from=builder /app/deploy/tools/favicon-generator ./deploy/tools/favicon-generator
RUN ["chmod", "-R", "777", "./deploy/tools/favicon-generator"]
RUN ["chmod", "-R", "777", "./public"]

Expand Down
2 changes: 1 addition & 1 deletion deploy/scripts/favicon_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ master_url="${FAVICON_MASTER_URL:-$NEXT_PUBLIC_NETWORK_ICON}"
export MASTER_URL="$master_url"

cd ./deploy/tools/favicon-generator
./script.sh
node "$(dirname "$0")/index.js"
if [ $? -ne 0 ]; then
cd ../../../
exit 1
Expand Down
13 changes: 9 additions & 4 deletions deploy/tools/favicon-generator/.gitignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/output
config.json
response.json
favicon_package**
/node_modules
/public
.env
.env.registry
.env.secrets
index.js
296.index.js
index.js.LICENSE.txt
/output
41 changes: 0 additions & 41 deletions deploy/tools/favicon-generator/config.template.json

This file was deleted.

20 changes: 20 additions & 0 deletions deploy/tools/favicon-generator/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "favicon-generator",
"version": "1.0.0",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"favicons": "^7.2.0",
"ts-loader": "^9.4.4",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
},
"devDependencies": {
"dotenv-cli": "^7.4.2",
"node-loader": "^2.0.0",
"tsconfig-paths-webpack-plugin": "^4.1.0"
}
}
113 changes: 0 additions & 113 deletions deploy/tools/favicon-generator/script.sh

This file was deleted.

Loading

0 comments on commit 5df383f

Please sign in to comment.