Skip to content

Commit 47947f4

Browse files
chore(workflow): place Webpack-generated static files in ./static/dist (#2130)
1 parent 7d99b0b commit 47947f4

File tree

9 files changed

+11
-18
lines changed

9 files changed

+11
-18
lines changed

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,3 @@ db.sqlite3
5656

5757
# Django
5858
staticfiles/
59-
60-
# Static files
61-
static/js/anthias.js*
62-
static/js/settings.js*
63-
static/css/anthias.css*

docker/Dockerfile.server.j2

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,8 @@ WORKDIR /usr/src/app
3838

3939
{% if environment == 'production' %}
4040
COPY --from=node-builder \
41-
/app/static/css/ \
42-
/usr/src/app/static/css/
43-
COPY --from=node-builder \
44-
/app/static/js/*.js* \
45-
/usr/src/app/static/js/
41+
/app/static/dist/ \
42+
/usr/src/app/static/dist/
4643
{% endif %}
4744

4845
ENV GIT_HASH={{ git_hash }}

static/spec/runner.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<script src="/static/js/bootstrap-datepicker.js"></script>
2424
<script src="/static/js/bootstrap-timepicker.js"></script>
2525
<script src="/static/js/moment.js"></script>
26-
<script src="../js/anthias.js"></script>
26+
<script src="../dist/js/anthias.js"></script>
2727

2828
</head>
2929

templates/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<meta content="/static/favicons/mstile-310x150.png" name="msapplication-wide310x150logo"/>
3333
<meta content="/static/favicons/mstile-310x310.png" name="msapplication-square310x310logo"/>
3434

35-
<link href="{% static 'css/anthias.css' %}" type="text/css" rel="stylesheet"/>
35+
<link href="{% static 'dist/css/anthias.css' %}" type="text/css" rel="stylesheet"/>
3636

3737
<link href="{% static 'fontawesome/css/all.css' %}" rel="stylesheet"/>
3838

templates/hotspot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8"/>
55
<title>Hotspot Page</title>
6-
<link href="/static/css/anthias.css" rel="stylesheet"/>
6+
<link href="/static/dist/css/anthias.css" rel="stylesheet"/>
77
<link href="https://fonts.googleapis.com/css?family=Plus Jakarta Sans" rel="stylesheet">
88
<link rel="icon" href="/static/favicons/favicon.ico">
99
<style type="text/css">

templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
var wsAddresses = JSON.parse(document.getElementById('ws_addresses').textContent);
3636
</script>
3737

38-
<script src="{% static 'js/anthias.js' %}"></script>
38+
<script src="{% static 'dist/js/anthias.js' %}"></script>
3939
<script src="{% static 'js/main.js' %}"></script>
4040

4141
<script id="asset-row-template" type="text/template">

templates/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<script src="{% static 'js/jquery.fileupload.js' %}"></script> <!-- needs jqueryui.widget -->
1212
<script src="{% static 'js/bootstrap-datepicker.js' %}"></script>
1313

14-
<script src="{% static 'js/settings.js' %}"></script>
14+
<script src="{% static 'dist/js/settings.js' %}"></script>
1515
{% endblock %}
1616

1717
{% block content %}

templates/splash-page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{% load static %}
77
<meta charset="utf-8"/>
88
<title>Welcome to Anthias</title>
9-
<link href="{% static 'css/anthias.css' %}" rel="stylesheet"/>
9+
<link href="{% static 'dist/css/anthias.css' %}" rel="stylesheet"/>
1010
<link href="https://fonts.googleapis.com/css?family=Plus Jakarta Sans" rel="stylesheet">
1111
<link rel="icon" href="/static/favicons/favicon.ico">
1212
<style type="text/css">

webpack.common.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ module.exports = {
77
"settings": "./static/js/settings.coffee",
88
},
99
output: {
10-
path: path.resolve(__dirname, "static"),
11-
filename: "js/[name].js"
10+
path: path.resolve(__dirname, "static/dist"),
11+
filename: "js/[name].js",
12+
clean: true,
1213
},
1314
plugins: [
1415
new MiniCssExtractPlugin({

0 commit comments

Comments
 (0)