parent
aba8293c51
commit
cdf61ca665
24
Gruntfile.js
24
Gruntfile.js
|
@ -1,20 +1,20 @@
|
|||
const path = require('path');
|
||||
const path = require("path");
|
||||
|
||||
module.exports = grunt => {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON("package.json"),
|
||||
clean: {
|
||||
default: [".nyc_output/", "dist/"]
|
||||
default: [".nyc_output/", "dist/"],
|
||||
},
|
||||
copy: {
|
||||
css: {
|
||||
files: [{expand: true, cwd: "src/main/", src: "**/*.css", dest: "dist/"}]
|
||||
files: [{expand: true, cwd: "src/main/css/", src: "**/*.css", dest: "dist/"}]
|
||||
},
|
||||
html: {
|
||||
files: [{expand: true, cwd: "src/main/", src: "**/*.html", dest: "dist/"}]
|
||||
},
|
||||
images: {
|
||||
files: [{expand: true, cwd: "src/main/", src: ["**/*.ico", "**/*.png", "**/*.svg"], dest: "dist/"}]
|
||||
files: [{expand: true, cwd: "src/main/img/", src: ["**/*.ico", "**/*.png", "**/*.svg"], dest: "dist/"}]
|
||||
},
|
||||
pwa: {
|
||||
files: [{expand: true, cwd: "src/main/", src: ["manifest.json", "sw.js"], dest: "dist/"}]
|
||||
|
@ -32,9 +32,9 @@ module.exports = grunt => {
|
|||
{
|
||||
from: "%%VERSION_NUMBER%%",
|
||||
to: "<%= pkg.version %>+" + new Date().toISOString().slice(0, 19).replace(/[-:T]/g, "")
|
||||
}
|
||||
},
|
||||
],
|
||||
overwrite: true
|
||||
overwrite: true,
|
||||
},
|
||||
deploy: {
|
||||
src: ["./dist/*.html", "./dist/*.js"],
|
||||
|
@ -42,10 +42,10 @@ module.exports = grunt => {
|
|||
{
|
||||
from: "%%VERSION_NUMBER%%",
|
||||
to: "<%= pkg.version %>"
|
||||
}
|
||||
},
|
||||
],
|
||||
overwrite: true
|
||||
}
|
||||
overwrite: true,
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
css: {
|
||||
|
@ -83,7 +83,7 @@ module.exports = grunt => {
|
|||
output: {
|
||||
filename: "bundle.js",
|
||||
path: path.resolve(__dirname, "dist/"),
|
||||
}
|
||||
},
|
||||
},
|
||||
dev: {
|
||||
mode: "development",
|
||||
|
@ -91,8 +91,8 @@ module.exports = grunt => {
|
|||
},
|
||||
deploy: {
|
||||
mode: "production"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks("grunt-contrib-clean");
|
||||
|
|
Binary file not shown.
22
package.json
22
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fwdekker.com",
|
||||
"version": "0.39.14",
|
||||
"version": "0.39.15",
|
||||
"description": "The source code of [my personal website](https://fwdekker.com/).",
|
||||
"author": "Felix W. Dekker",
|
||||
"browser": "dist/bundle.js",
|
||||
|
@ -24,27 +24,27 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||
"@types/chai": "^4.2.14",
|
||||
"@types/chai": "^4.2.15",
|
||||
"@types/js-cookie": "^2.2.6",
|
||||
"@types/mocha": "^8.2.0",
|
||||
"@types/mocha": "^8.2.2",
|
||||
"@types/semver": "^6.2.1",
|
||||
"chai": "^4.2.0",
|
||||
"chai": "^4.3.4",
|
||||
"grunt": "^1.3.0",
|
||||
"grunt-cli": "^1.3.2",
|
||||
"grunt-cli": "^1.4.1",
|
||||
"grunt-contrib-clean": "^2.0.0",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-focus": "^1.0.0",
|
||||
"grunt-text-replace": "^0.4.0",
|
||||
"grunt-webpack": "^4.0.2",
|
||||
"jsdom": "^16.4.0",
|
||||
"jsdom": "^16.5.1",
|
||||
"jsdom-global": "^3.0.2",
|
||||
"mocha": "^8.2.1",
|
||||
"mocha": "^8.3.2",
|
||||
"nyc": "^15.1.0",
|
||||
"ts-loader": "^8.0.12",
|
||||
"ts-loader": "^8.0.18",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "^4.1.3",
|
||||
"webpack": "^5.10.1",
|
||||
"webpack-cli": "^4.2.0"
|
||||
"typescript": "^4.2.3",
|
||||
"webpack": "^5.28.0",
|
||||
"webpack-cli": "^4.5.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
|
||||
<title>FWDekker</title>
|
||||
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<link rel="apple-touch-icon" href="img/icon_ios.png" />
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link rel="icon" type="image/png" href="favicon.png?v=%%VERSION_NUMBER%%" />
|
||||
<link rel="apple-touch-icon" href="icon_ios.png?v=%%VERSION_NUMBER%%" />
|
||||
<link rel="manifest" href="manifest.json?v=%%VERSION_NUMBER%%">
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700" rel="stylesheet" />
|
||||
<link href="css/main.css" rel="stylesheet" />
|
||||
<link href="main.css?v=%%VERSION_NUMBER%%" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
if ("serviceWorker" in navigator) {
|
||||
window.addEventListener("load", function () {
|
||||
return navigator.serviceWorker.register("sw.js");
|
||||
return navigator.serviceWorker.register("sw.js?v=%%VERSION_NUMBER%%");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -10,27 +10,27 @@
|
|||
"description": "Felix W. Dekker's personal website",
|
||||
"icons": [
|
||||
{
|
||||
"src": "img/icon_128x128.png",
|
||||
"src": "icon_128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "img/icon_144x144.png",
|
||||
"src": "icon_144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "img/icon_152x152.png",
|
||||
"src": "icon_152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "img/icon_192x192.png",
|
||||
"src": "icon_192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "img/icon_512x512.png",
|
||||
"src": "icon_512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@ const CACHE_FILES = [
|
|||
"favicon.png",
|
||||
"index.html",
|
||||
"manifest.json",
|
||||
"css/main.css",
|
||||
"img/icon_128x128.png",
|
||||
"img/icon_144x144.png",
|
||||
"img/icon_152x152.png",
|
||||
"img/icon_192x192.png",
|
||||
"img/icon_512x512.png",
|
||||
"img/icon_ios.png"
|
||||
"main.css",
|
||||
"icon_128x128.png",
|
||||
"icon_144x144.png",
|
||||
"icon_152x152.png",
|
||||
"icon_192x192.png",
|
||||
"icon_512x512.png",
|
||||
"icon_ios.png"
|
||||
];
|
||||
|
||||
self.addEventListener("install", event =>
|
||||
|
|
Loading…
Reference in New Issue