
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@vuetify/vue-cli-plugin-preset-base
Advanced tools
Create your regular and base components here
This folder is for organizing your project's components. It is structured to support the official Vue style-guide. Below are examples of varoius project structures for components.
A custom component is one that is used in more than one place but is not generic enough to used as a base component.
.
└── components
├── CustomComponent.vue
└── CustomComponentTwo.vue
Base components are global components that should always be in the root of the /base
folder. These components will be automatically bootstrapped into Vue via the base.js plugin.
.
└── src
├── components
│ ├── CustomComponent.vue
│ └── base
│ └── Btn.vue
└── plugins
├── base.js # Bootstraps *.vue in `src/components/base`
├── index.js
└── vuetify.js
Example usage This is an example of how to use base components; global components that can be used in any other component.
<!-- In Template -->
<template>
<div>
<base-btn>...</base-btn>
</div>
</template>
<!-- src/components/base/Btn.vue -->
<template>
<v-btn
:color="color"
v-bind="$attrs"
v-on="$listeners"
>
<slot />>
</v-btn>
</template>
<script>
export default {
name: 'Btn',
props: {
color: {
type: String,
default: 'primary',
},
},
}
</script>
The component name is automatically prefixed with
Base
.Btn
would yieldBaseBtn
andMyComponent
would yieldBaseMyComponent
Views that utilize proprietary components—ones that only exist within or for that page—should keep them scoped to the container view.
.
└── views
└── home
├── Index.vue
├── Section.vue
└── components
├── CustomComponent.vue
└── CustomComponentTwo.vue
Example usage This is an example of what importing a custom component for a View might look like.
<!-- src/views/home/Index.vue -->
<script>
export default {
components: {
CustomComponent: () => import('./components/CustomComponent'),
CustomComponentTwo: () => import('./components/CustomComponentTwo'),
}
}
</script>
FAQs
A baseline preset for Vue CLI and Vuetify
The npm package @vuetify/vue-cli-plugin-preset-base receives a total of 113 weekly downloads. As such, @vuetify/vue-cli-plugin-preset-base popularity was classified as not popular.
We found that @vuetify/vue-cli-plugin-preset-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.