
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@calidae/vue-generate-component
Advanced tools
Developed upon the work of vue-generate-component.
CLI util for easy generate Vue component structure.
npm install -g @calidae/vue-generate-component
If you want to try it out without polluting your global npm, you can use npx:
npx @calidae/vue-generate-component [ARGUMENTS]
vgc Footer
Will generate a folder called Footer
in your current directory vue component file:
Footer.vue
<template>
<div class="footer">
Footer component
</div>
</template>
<script>
export default {
name: 'Footer',
data () {
return {}
}
}
</script>
<style scoped></style>
If you want to create a index.js to simplify the import statements simply add the --index
flag or use the alias -i
vgc Footer --index
vgc Footer -i
index.js
import Footer from './Footer'
export default Footer
If you want to create a **.spec.js test file as a boilerplate where start wrtiting your own tests simply add the --test
flag or use the alias -t
vgc Footer --test
vgc Footer -t
Footer.spec.js
import Footer from './index.js'
import { mount } from '@vue/test-utils'
describe('Footer.vue', () => {
it('renders main node', () => {
const wrapper = mount(Footer)
expect(wrapper.classes()).toContain('Footer')
})
})
This project tries to solve tedious copy&paste operations from our daily workflow. Please notice that the generated files will require some external libraries such as Vue, @vue/test-utils or Sass loader configuration. Make sure these libraries are available in your project.
FAQs
Vue js component generator
We found that @calidae/vue-generate-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.