Skip to content

Commit

Permalink
chore: change file name for cache busting
Browse files Browse the repository at this point in the history
  • Loading branch information
talha131 committed Feb 4, 2020
1 parent 2aace21 commit 791a35b
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 46 deletions.
14 changes: 7 additions & 7 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const watchFiles = () => {
"static/**/*.js",
"!static/**/bootstrap.css",
"!static/**/bootstrap_responsive.css",
"!static/**/elegant.prod.e4bd582858.css",
"!static/js/elegant.prod.e4bd582858.js"
"!static/**/elegant.prod.2aace21d63.css",
"!static/js/elegant.prod.2aace21d63.js"
],
{ ignoreInitial: false },
buildAll
Expand All @@ -78,7 +78,7 @@ const watchFiles = () => {

const pathProdCSS = path.join(
__dirname,
"static/css/elegant.prod.e4bd582858.css"
"static/css/elegant.prod.2aace21d63.css"
);
const rmProdCSS = cb => {
if (fs.existsSync(pathProdCSS)) {
Expand All @@ -96,9 +96,9 @@ const minifyJS = () => {
"static/clipboard/clipboard.js",
"static/js/copy-to-clipboard.js",
"static/js/lunr-search-result.js",
"!static/js/elegant.prod.e4bd582858.js"
"!static/js/elegant.prod.2aace21d63.js"
])
.pipe(concat("elegant.prod.e4bd582858.js"))
.pipe(concat("elegant.prod.2aace21d63.js"))
.pipe(terser())
.pipe(dest("static/js/"));
};
Expand All @@ -116,10 +116,10 @@ const compileCSS = () => {
"static/photoswipe/photoswipe.css",
"static/photoswipe/default-skin/default-skin.css",
"static/css/*.css",
"!static/css/elegant.prod.e4bd582858.css"
"!static/css/elegant.prod.2aace21d63.css"
])
.pipe(postcss(plugins))
.pipe(concat("elegant.prod.e4bd582858.css"))
.pipe(concat("elegant.prod.2aace21d63.css"))
.pipe(dest("static/css/"));
};

Expand Down
36 changes: 36 additions & 0 deletions static/css/elegant.prod.2aace21d63.css

Large diffs are not rendered by default.

36 changes: 0 additions & 36 deletions static/css/elegant.prod.e4bd582858.css

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion templates/_includes/minify_css.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% assets filters="cssmin", output="css/style.min.css",
"css/elegant.prod.e4bd582858.css",
"css/elegant.prod.2aace21d63.css",
"css/custom.css" %}
<link rel="stylesheet" href="{{ SITEURL }}/{{ ASSET_URL }}">
{% endassets %}
4 changes: 2 additions & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% if 'assets' in PLUGINS %}
{% include '_includes/minify_css.html' with context %}
{% else %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/elegant.prod.e4bd582858.css" media="screen">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/elegant.prod.2aace21d63.css" media="screen">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/custom.css" media="screen">
{% endif %}
{% endblock head_links %}
Expand Down Expand Up @@ -106,7 +106,7 @@
{% endif %}
<script src="//code.jquery.com/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="{{ SITEURL }}/theme/js/elegant.prod.e4bd582858.js"></script>
<script src="{{ SITEURL }}/theme/js/elegant.prod.2aace21d63.js"></script>
<script>
function validateForm(query)
{
Expand Down

0 comments on commit 791a35b

Please sign in to comment.