Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vue-component-tree
Advanced tools
Tree view for your demo components. Demo.
npm install 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.create(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.Inside of your demo component you can set status, which will colorize filenames on the tree in accordance.
{
status: 'wip',
data () {
// ...
}
}
Supported statuses are:
You can add your own. They're just css classes.
You don't have to keep demos in production. Use webpack define-plugin and exclude them from bundle.
Leave 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 7 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.