Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
vue-component-tree
Advanced tools
Tree view for your demo components. Demo.
npm install -D vue-component-tree
yarn add -D vue-component-tree
I'll talk a bit about demo based workflow I employ in my projects.
Before doing any work on component I create a demo. Demo allows me to define an interface, like this:
<vm-new-component v-model="dataItem" :some-prop="prop"/>
Only then I start to work on component.
You can think of demo as of semi-manual unit tests. But why not use actual unit tests, you'll ask. Let me explain.
Of course, this doesn't mean you have to dump unit tests. Leave them for appropriate tasks. Like logic heavy classes.
So, back to the library. The main intent behind is simplifying demo workflow as much as possible. Just toss your demos into folder and enjoy tree generation.
Attach VueComponentTree to your router. And yes, vue-router is required.
import Router from 'vue-router'
import VueComponentTree from 'vue-component-tree'
const router = new Router({
routes: [
VueComponentTree(require.context('./../tree', true, /.vue$/), '/demo'),
]
})
So, about arguments.
require.context('./../tree', true, /.vue$/), '/demo'
./../tree
is path to your demo folder. Works the same as require/import./demo
is root route for vue-router.You don't have to keep demos in production. Use webpack define-plugin and exclude them from bundle.
yarn demo
- compile assetsyarn dist
- compile assetsnpm publish
- publish to npmLeave an issue if something doesn't work for you.
Also remember: Stars fuel package development!
MIT
FAQs
Tree view for your demo components
The npm package vue-component-tree receives a total of 19 weekly downloads. As such, vue-component-tree popularity was classified as not popular.
We found that vue-component-tree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.