Skip to content

Commit

Permalink
Add temp asset version (#880)
Browse files Browse the repository at this point in the history
* docs(js): add quickfix version to js file

* docs(css): add version number to css
  • Loading branch information
chrispymm authored Oct 28, 2024
1 parent e967181 commit 3d92a7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
content="Design your service using MoJ styles, components and patterns">
<meta property="og:image"
content="{{ '/assets/images/moj-opengraph-image.png' | url }}">
<link href="{{ '/assets/stylesheets/application.css' | url }}"
<link href="{{ '/assets/stylesheets/application-20241028.css' | url }}"
rel="stylesheet">
{% block pageStyles %}{% endblock %}
<title>
Expand Down
8 changes: 6 additions & 2 deletions gulp/docs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const gulp = require("gulp");
const sass = require("gulp-sass")(require("sass"));
const {createGulpEsbuild} = require("gulp-esbuild")
const rename = require("gulp-rename");
const {createGulpEsbuild} = require("gulp-esbuild");
const esbuild = createGulpEsbuild({
incremental: false, // enables the esbuild"s incremental build
piping: true, // enables piping
Expand Down Expand Up @@ -42,7 +43,10 @@ gulp.task(
return gulp
.src("docs/assets/stylesheets/application.scss")
.pipe(sass())
.pipe(gulp.dest("public/assets/stylesheets"));
.pipe(rename({
suffix: `-${VERSION}`
}))
.pipe(gulp.dest("public/assets/stylesheets/"));
}
);

Expand Down
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d92a7f

Please sign in to comment.