- Make sure you go through the getting started guide first.
- Have some knowledge of Typescript, Vue3 & Composition API
We are going to add new weblet called demo
- Add new file called tf_demo.vue at
src/weblets/
- Import the demo file in views folder & include the deployment list with the project name (demo) in this case
Note: Make sure to include the project name to ProjectName enum in index.ts
<template>
<div>
<TfDemo />
<div class="mt-4">
<TfDeploymentList title="deployment list" :project-name="name" />
</div>
</div>
</template>
<script lang="ts">
import { ProjectName } from "../types";
import TfDemo from "../weblets/tf_demo.vue";
import TfDeploymentList from "../weblets/tf_deployment_list.vue";
export default {
name: "DemoView",
components: {
TfDemo,
TfDeploymentList,
},
setup() {
return { name: ProjectName.Demo };
},
};
</script>
-
Add the routing for the created project in index.ts.
// index.ts { path: "/demo", component: () => import("../views/tf_demo.vue"), meta: { title: "Demo" }, },
-
You can now run the new solution
yarn dev