forked from tools/doomsday
Use new template system
This commit is contained in:
parent
b0241db1fb
commit
39d4fc31e1
10
Gruntfile.js
10
Gruntfile.js
|
@ -8,10 +8,10 @@ module.exports = grunt => {
|
|||
},
|
||||
copy: {
|
||||
css: {
|
||||
files: [{expand: true, cwd: "src/main/css/", src: "**/*.css", dest: "dist/"}]
|
||||
files: [{expand: true, cwd: "src/main/", src: "**/*.css", dest: "dist/", flatten: true}]
|
||||
},
|
||||
html: {
|
||||
files: [{expand: true, cwd: "src/main/", src: "**/*.html", dest: "dist/"}]
|
||||
files: [{expand: true, cwd: "src/main/", src: "**/*.html", dest: "dist/", flatten: true}]
|
||||
},
|
||||
},
|
||||
focus: {
|
||||
|
@ -21,7 +21,7 @@ module.exports = grunt => {
|
|||
},
|
||||
replace: {
|
||||
dev: {
|
||||
src: ["./dist/*.html", "./dist/*.js"],
|
||||
src: ["./dist/**/*.html", "./dist/**/*.js"],
|
||||
replacements: [
|
||||
{
|
||||
from: "%%VERSION_NUMBER%%",
|
||||
|
@ -31,7 +31,7 @@ module.exports = grunt => {
|
|||
overwrite: true
|
||||
},
|
||||
deploy: {
|
||||
src: ["./dist/*.html", "./dist/*.js"],
|
||||
src: ["./dist/**/*.html", "./dist/**/*.js"],
|
||||
replacements: [
|
||||
{
|
||||
from: "%%VERSION_NUMBER%%",
|
||||
|
@ -61,7 +61,7 @@ module.exports = grunt => {
|
|||
},
|
||||
webpack: {
|
||||
options: {
|
||||
entry: "./src/main/js/index.js",
|
||||
entry: "./src/main/js/main.js",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
|
Binary file not shown.
13
package.json
13
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "doomsday",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12",
|
||||
"description": "Test your mastery of Conway's Doomsday rule.",
|
||||
"author": "Felix W. Dekker",
|
||||
"browser": "dist/bundle.js",
|
||||
|
@ -15,19 +15,16 @@
|
|||
"dev:server": "grunt dev:server",
|
||||
"deploy": "grunt deploy"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fwdekker/template": "^0.0.24"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "^1.3.0",
|
||||
"grunt-cli": "^1.4.1",
|
||||
"grunt-cli": "^1.4.2",
|
||||
"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",
|
||||
"webpack": "^5.28.0",
|
||||
"webpack-cli": "^4.5.0"
|
||||
"grunt-webpack": "^4.0.3",
|
||||
"webpack": "^5.33.2",
|
||||
"webpack-cli": "^4.6.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,22 +11,22 @@
|
|||
<title>Doomsday | FWDekker</title>
|
||||
|
||||
<link rel="stylesheet" href="https://static.fwdekker.com/fonts/roboto.css" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://static.fwdekker.com/lib/template/1.x.x/bundle.css" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="main.css?v=%%VERSION_NUMBER%%" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<span style="color: red; font-weight: bold;">
|
||||
<p style="color: red; font-weight: bold;">
|
||||
This website does not function if JavaScript is disabled.
|
||||
Please check the <a href="https://www.enable-javascript.com/">
|
||||
instructions on how to enable JavaScript in your web browser</a>.
|
||||
</span>
|
||||
</p>
|
||||
</noscript>
|
||||
<main style="display: none;">
|
||||
<div id="nav"></div>
|
||||
<div id="contents">
|
||||
<div id="header"></div>
|
||||
|
||||
|
||||
<!-- Input -->
|
||||
<section class="container">
|
||||
<form>
|
||||
|
@ -79,8 +79,8 @@
|
|||
<div id="footer"></div>
|
||||
</main>
|
||||
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="https://static.fwdekker.com/lib/template/1.x.x/bundle.js" crossorigin="anonymous"></script>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script src="bundle.js?v=%%VERSION_NUMBER%%"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {$, doAfterLoad, footer, header, nav, showPage} from "@fwdekker/template";
|
||||
const {$, doAfterLoad, footer, header, nav, showPage} = window.fwdekker;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -359,11 +359,6 @@ doAfterLoad(() => {
|
|||
`
|
||||
}));
|
||||
$("#footer").appendChild(footer({
|
||||
author: "Felix W. Dekker",
|
||||
authorURL: "https://fwdekker.com/",
|
||||
license: "MIT License",
|
||||
licenseURL: "https://git.fwdekker.com/FWDekker/doomsday/src/branch/master/LICENSE",
|
||||
vcs: "git",
|
||||
vcsURL: "https://git.fwdekker.com/FWDekker/doomsday/",
|
||||
version: "v%%VERSION_NUMBER%%"
|
||||
}));
|
Loading…
Reference in New Issue