
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
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.
@calidae/vue-generate-component
Advanced tools
Developed upon the work of vue-generate-component.
CLI util for easy generate Vue js component
npm install -g @calidae/vue-generate-component
vgc --help
vgc Footer
Will generate a folder called Footer
in your current directory with three files :
index.js
import Footer from './Footer'
export default Footer
Footer.vue
<template>
<div class="c-footer">
</div>
</template>
<script>
export default {
name: 'Footer',
data() {
return {}
}
}
</script>
Footer.spec.js
import Vue from 'vue'
import Footer from './index.js'
import { mount, shallow } from '@vue/test-utils'
describe('Footer.vue', () => {
it('is a component', () => {
const wrapper = mount(Footer)
expect(wrapper.isVueInstance()).toBeTruthy()
})
it('renders an snapshot', () => {
const wrapper = shallow(Footer)
expect(wrapper.html()).toMatchSnapshot('default')
})
})
If you want to replicate the structure outlined above but adding a Container
component, just add the container
flag:
vgc Footer --container
Will modify the index.js
file and create a new container component and test file:
index.js
import FooterContainer from './FooterContainer'
export default FooterContainer
FooterContainer.vue
<template>
<div>
<Footer />
</div>
</template>
<script>
import Footer from './Footer'
export default {
name: 'FooterContainer',
components: {
Footer
},
data() {
return {}
}
}
</script>
FooterContainer.spec.js
import Vue from 'vue'
import FooterContainer from './FooterContainer'
import { mount, shallow } from '@vue/test-utils'
describe('FooterContainer.vue', () => {
it('is a component', () => {
const wrapper = mount(FooterContainer)
expect(wrapper.isVueInstance()).toBeTruthy()
})
it('renders an snapshot', () => {
const wrapper = shallow(FooterContainer)
expect(wrapper.html()).toMatchSnapshot('default')
})
})
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.
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.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.