Skip to content

Commit

Permalink
Remove fonts from sass build workflow (#12429)
Browse files Browse the repository at this point in the history
* Update build script

* Move fonts files

* Update font file includes
  • Loading branch information
robdivincenzo authored Jun 6, 2024
1 parent ba385d7 commit cad7478
Show file tree
Hide file tree
Showing 54 changed files with 270 additions and 248 deletions.
2 changes: 1 addition & 1 deletion network-api/networkapi/templates/donate/pages/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% block stylesheets %}
<link rel="stylesheet" href="{% static "_css/donate.compiled.css" %}">
<link rel="stylesheet" href="{% static "_css/fonts.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/base.min.css" %}">
{% if debug %}<link rel="stylesheet" href="{% static "_css/tailwind.compiled.css" %}">{% endif %}
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion network-api/networkapi/templates/pages/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

{% block stylesheets %}
<link rel="stylesheet" href="{% static "_css/main.compiled.css" %}">
<link rel="stylesheet" href="{% static "_css/fonts.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/base.min.css" %}">
{% endblock %}

{% block extended_head %}{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{% block stylesheets %}
{% if debug %}<link rel="stylesheet" href="{% static "_css/tailwind.compiled.css" %}">{% endif %}
<link rel="stylesheet" href="{% static "_css/buyers-guide.compiled.css" %}">
<link rel="stylesheet" href="{% static "_css/fonts.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/base.min.css" %}">
{% endblock %}

{% block extended_head %}{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion network-api/networkapi/templates/pattern_library_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

{% block stylesheets %}
<link rel="stylesheet" href="{% static "_css/main.compiled.css" %}">
<link rel="stylesheet" href="{% static "_css/fonts.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/base.min.css" %}">
{% if debug %}<link rel="stylesheet" href="{% static "_css/tailwind.compiled.css" %}">{% endif %}
{% endblock %}
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- our app's additional CSS -->
<link rel="stylesheet" href="{% static "_css/main.compiled.css" %}">
<link rel="stylesheet" href="{% static 'wagtailadmin/css/layouts/404-additionals.css' %}" />
<link rel="stylesheet" href="{% static "_css/fonts.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/base.min.css" %}">
{% endblock %}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block body_id %}dear-internet{% endblock %}

{% block extended_head %}
<link rel="stylesheet" href="{% static "_css/fonts.caveat.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/caveat.min.css" %}">
{% endblock %}

{% block content %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block body_id %}youtube-regrets-reporter-extension{% endblock %}

{% block extended_head %}
<link rel="stylesheet" href="{% static "_css/fonts.changa.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/changa.min.css" %}">
<script src="https://c.shpg.org/352/sp.js"></script>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block bodyclass %}youtube-regrets-2021 youtube-regrets-shared{% endblock %}

{% block extended_head %}
<link rel="stylesheet" href="{% static "_css/fonts.changa.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/changa.min.css" %}">
{% endblock %}

{# Empty header; Do not add <header role="banner"> to the page #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block bodyclass %}youtube-regrets-2022 youtube-regrets-shared{% endblock %}

{% block extended_head %}
<link rel="stylesheet" href="{% static "_css/fonts.changa.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/changa.min.css" %}">
{% endblock %}

{# Empty header; Do not add <header role="banner"> to the page #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block bodyclass %}has-regrets-intro{% endblock %}

{% block extended_head %}
<link rel="stylesheet" href="{% static "_css/fonts.changa.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/changa.min.css" %}">
{% endblock %}

{# Empty header; Do not add <header role="banner"> to the page #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block body_id %}youtube-regrets{% endblock %}

{% block extended_head %}
<link rel="stylesheet" href="{% static "_css/fonts.changa.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/changa.min.css" %}">
{% endblock %}

{% block intro_stationary_wrapper %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block body_id %}youtube-regrets-reporter{% endblock %}

{% block extended_head %}
<link rel="stylesheet" href="{% static "_css/fonts.changa.compiled.css" %}">
<link rel="stylesheet" href="{% static "_fonts/css/changa.min.css" %}">
{% endblock %}

{% block intro_stationary_wrapper %}
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
"build:images": "shx rm -rf network-api/networkapi/frontend/_images && shx cp -r source/images network-api/networkapi/frontend/_images",
"build:js:dev": "node esbuild.config.js -- --node-env development",
"build:js:prod": "node esbuild.config.js -- --node-env production",
"build:fonts": "run-p build:fonts:fonts && run-p build:fonts:css",
"build:fonts:fonts": "shx rm -rf network-api/networkapi/frontend/_fonts && cp -r source/fonts network-api/networkapi/frontend/_fonts",
"build:fonts:css": "run-p build:fonts:css:**",
"build:fonts:css:base": "sass --style=compressed source/fonts/css/base.css network-api/networkapi/frontend/_fonts/css/base.min.css && shx rm network-api/networkapi/frontend/_fonts/css/base.css",
"build:fonts:css:caveat": "sass --style=compressed source/fonts/css/caveat.css network-api/networkapi/frontend/_fonts/css/caveat.min.css && shx rm network-api/networkapi/frontend/_fonts/css/caveat.css",
"build:fonts:css:changa": "sass --style=compressed source/fonts/css/changa.css network-api/networkapi/frontend/_fonts/css/changa.min.css && shx rm network-api/networkapi/frontend/_fonts/css/changa.css",
"build:css": "run-p build:css:file:**",
"build:css:file:main": "sass source/sass/main.scss network-api/networkapi/temp/frontend/_css/main.compiled.css",
"build:css:file:fonts": "sass source/sass/fonts.scss network-api/networkapi/temp/frontend/_css/fonts.compiled.css",
"build:css:file:fonts:caveat": "sass source/sass/font-faces/caveat.scss network-api/networkapi/temp/frontend/_css/fonts.caveat.compiled.css",
"build:css:file:fonts:changa": "sass source/sass/font-faces/changa.scss network-api/networkapi/temp/frontend/_css/fonts.changa.compiled.css",
"build:css:file:bg": "sass source/sass/buyers-guide/bg-main.scss network-api/networkapi/temp/frontend/_css/buyers-guide.compiled.css",
"build:css:file:donate": "sass source/sass/donate/donate-main.scss network-api/networkapi/temp/frontend/_css/donate.compiled.css",
"build:css:file:formassembly": "sass source/sass/formassembly-override.scss network-api/networkapi/temp/frontend/_css/formassembly-override.compiled.css",
"build:fonts": "shx rm -rf network-api/networkapi/frontend/_fonts && cp -r source/fonts network-api/networkapi/frontend/_fonts",
"docker:up": "docker-compose up",
"docker:down": "docker-compose down",
"fix": "run-s fix:*",
Expand Down Expand Up @@ -64,7 +66,6 @@
"sync": "browser-sync start --proxy \"localhost:8000\" --reload-debounce 50 --files \"./network-api/networkapi/**/*.html\" \"./network-api/networkapi/frontend/_css/*.css\" \"./network-api/networkapi/frontend/_js/*.js\"",
"test": "npm run lint",
"watch": "run-s build:clean && run-p build:common && run-p build:js:dev postcss:watch watch:**",
"watch:fonts": "chokidar \"source/fonts/**/*\" -c \"npm run build:fonts\"",
"watch:images": "chokidar \"source/images/**/*\" -c \"npm run build:images\"",
"watch:scss": "chokidar \"source/**/*.scss\" -c \"npm run build:css\""
},
Expand Down
Loading

0 comments on commit cad7478

Please sign in to comment.