
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
tree-sitter-vue
Advanced tools
Vue (Vue v2.6.0 Template Syntax) grammar for tree-sitter
Note: This grammar is not responsible for parsing embedded languages, see Multi-language Documents for more info.
npm install tree-sitter-vue tree-sitter
const Parser = require("tree-sitter");
const Vue = require("tree-sitter-vue");
const parser = new Parser();
parser.setLanguage(Vue);
const sourceCode = `
<template>
Hello, <a :[key]="url">{{ name }}</a>!
</template>
`;
const tree = parser.parse(sourceCode);
console.log(tree.rootNode.toString());
// (component
// (template_element
// (start_tag
// (tag_name))
// (text)
// (element
// (start_tag
// (tag_name)
// (directive_attribute
// (directive_name)
// (directive_dynamic_argument
// (directive_dynamic_argument_value))
// (quoted_attribute_value
// (attribute_value))))
// (interpolation
// (raw_text))
// (end_tag
// (tag_name)))
// (text)
// (end_tag
// (tag_name))))
MIT © Ika
FAQs
Vue grammar for tree-sitter
The npm package tree-sitter-vue receives a total of 692 weekly downloads. As such, tree-sitter-vue popularity was classified as not popular.
We found that tree-sitter-vue 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.