package.json, add footer with version and link to homepage

This commit is contained in:
Tomáš Mládek 2020-07-15 23:05:29 +02:00
parent 7711f19810
commit 003c0be447
3 changed files with 20 additions and 1 deletions

View file

@ -1,6 +1,7 @@
{
"name": "kollagen",
"version": "0.1.0",
"version": "0.0.1",
"homepage": "https://gitlab.com/tmladek/kollagen",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

View file

@ -2,6 +2,7 @@
<div id="app">
<picker @images="images = $event"/>
<collage :images="images"/>
<footer><a :href="HOMEPAGE_URL">kollagen v{{APP_VERSION}}</a></footer>
</div>
</template>
@ -18,6 +19,14 @@ import Collage from "@/components/Collage.vue";
})
export default class App extends Vue {
private images: ImageBitmap[] = [];
private get APP_VERSION() {
return process.env.VUE_APP_VERSION;
}
private get HOMEPAGE_URL() {
return process.env.VUE_APP_HOMEPAGE;
}
}
</script>
@ -34,4 +43,9 @@ html, body {
justify-content: space-evenly;
min-height: 100vh;
}
footer {
width: 100%;
text-align: center;
}
</style>

View file

@ -1,3 +1,7 @@
const packageJSON = require('./package.json');
process.env.VUE_APP_VERSION = packageJSON.version;
process.env.VUE_APP_HOMEPAGE = packageJSON.homepage;
module.exports = {
publicPath: '/tools/kollagen'
};