diff --git a/.gitignore b/.gitignore index 7d5a785..4b43a61 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ package-lock.json .temp node_modules/ dist/yarn-error.log +.task/ diff --git a/.versionrc.json b/.versionrc.json index b4a1cf4..b49c3dc 100644 --- a/.versionrc.json +++ b/.versionrc.json @@ -1,4 +1,7 @@ { + "scripts": { + "postchangelog": "gotask changelog" + }, "types": [ { "type": "feat", "section": "Features" }, { "type": "fix", "section": "Bug Fixes" }, diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..cddf613 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,22 @@ +# https://taskfile.dev + +version: "3" + +vars: + GREETING: Hello, World! + +tasks: + release: + cmds: + - standard-version -a + changelog: + sources: [CHANGELOG.md] + generates: [src/lib/components/Changelog.svelte] + cmds: + - pnpx showdown makehtml -i CHANGELOG.md -o src/lib/components/Changelog.svelte + - git add src/lib/components/Changelog.svelte + + default: + cmds: + - echo "{{.GREETING}}" + silent: true diff --git a/package.json b/package.json index bfa5b6b..fac5e60 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "eslint-plugin-svelte3": "^3.4.1", "prettier": "~2.5.1", "prettier-plugin-svelte": "^2.6.0", + "showdown": "^2.0.3", "standard-version": "^9.3.2", "storybook-builder-vite": "0.1.21", "svelte": "^3.46.4", diff --git a/src/lib/components/About.svelte b/src/lib/components/About.svelte index 421f42a..364478c 100644 --- a/src/lib/components/About.svelte +++ b/src/lib/components/About.svelte @@ -1,40 +1,55 @@ - -
-

Welcome to the docks

+{#if showChangelog} + +

Changelog for the Docks

+
+ +
+
+{:else} + +
+

Welcome to the docks

-

version {import.meta.env.PACKAGE_VERSION}

-
+
+
version {import.meta.env.PACKAGE_VERSION}
+ (showChangelog = true)}>changelog +
+
-

- This app is a ship builder for the game - Full Thrust - . -

+

+ This app is a ship builder for the game + Full Thrust + . +

-

- The contruction rules are following the - - Cross Dimensions rules - - as closely as possible. -

+

+ The contruction rules are following the + + Cross Dimensions rules + + as closely as possible. +

-

- The app is mostly developed for Firefox. I also check as much as I can that - I don't mess things too badly on Chrome. For the other browsers... caveat - emptor. -

+

+ The app is mostly developed for Firefox. I also check as much as I can + that I don't mess things too badly on Chrome. For the other browsers... + caveat emptor. +

-

- Written by - Yanick Champoux - . Code available on - Github. -

-
+

+ Written by + Yanick Champoux + . Code available on + Github. +

+ +{/if} diff --git a/src/lib/components/Changelog.stories.svelte b/src/lib/components/Changelog.stories.svelte new file mode 100644 index 0000000..183f8b9 --- /dev/null +++ b/src/lib/components/Changelog.stories.svelte @@ -0,0 +1,15 @@ + + + + + + + diff --git a/src/lib/components/Changelog.svelte b/src/lib/components/Changelog.svelte new file mode 100644 index 0000000..0cf664c --- /dev/null +++ b/src/lib/components/Changelog.svelte @@ -0,0 +1,38 @@ +

Changelog

+

+ All notable changes to this project will be documented in this file. See standard-version for commit guidelines. +

+

+ 2.3.0 (2022-04-17) +

+

Features

+ +

+ 2.2.0 (2022-04-11) +

+

Features

+ +

+ 2.1.0 (2022-04-07) +

+

Features

+