tmpl-cli
api
docs
env
git
hbs
html
husky
jest
lintstaged
lisp
node
prettier
python
react
readme
schema
style
util
vue
Summaryvue component [name]vue init
web

$ tmpl vue component [name]

Create a vue component.

Files

project
└─src
└──components
└───foo
└────__tests__
└─────.test.ts
└────.vue

.test.ts

import { shallowMount } from '@vue/test-utils'
import from '../.vue'
describe(" component", () => {
describe("render", () => {
it("should render without error", () => {
// Arrange
const wrapper = shallowMount()
// Act
const element = wrapper.element.firstChild
// Assert
expect(element).not.toBeNull();
})
})
})

.vue

<template>
<div></div>
</template>
<script lang="ts">
export default {
name: ""
};
</script>
<style scoped>
</style>