New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stencil/vue-output-target

Package Overview
Dependencies
Maintainers
11
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stencil/vue-output-target - npm Package Compare versions

Comparing version 0.2.0-0 to 0.2.0

dist/generate-vue-component.d.ts

42

dist/index.cjs.js

@@ -130,36 +130,4 @@ 'use strict';

await compilerCtx.fs.writeFile(outputTarget.proxiesFile, finalText);
if (outputTarget.vetur) {
const docsJson = await compilerCtx.fs.readFile(outputTarget.docsFile);
const { veturTags, veturAttributes } = generateVetur(JSON.parse(docsJson), filteredComponents);
await Promise.all([
compilerCtx.fs.writeFile(outputTarget.veturTagsFile, JSON.stringify(veturTags, null, 2)),
compilerCtx.fs.writeFile(outputTarget.veturAttributesFile, JSON.stringify(veturAttributes, null, 2))
]);
}
await copyResources(config, outputTarget);
}
// TODO types
function generateVetur(docsJson, components) {
const tagsObject = {};
const attributesObject = {};
docsJson.components.forEach((component) => {
const shouldIncludeComponent = components.find(cmp => cmp.tagName === component.tag);
if (shouldIncludeComponent) {
tagsObject[component.tag] = {
description: component.docs,
attributes: component.props.map((prop) => prop.name)
};
component.props.forEach((prop) => {
attributesObject[`${component.tag}/${prop.name}`] = {
type: prop.type,
description: prop.docs
};
});
}
});
return {
veturTags: tagsObject,
veturAttributes: attributesObject
};
}
function getFilteredComponents(excludeComponents = [], cmps) {

@@ -248,4 +216,4 @@ return sortBy(cmps, (cmp) => cmp.tagName).filter((c) => !excludeComponents.includes(c.tagName) && !c.internal);

function normalizeOutputTarget(config, outputTarget) {
var _a, _b, _c;
const results = Object.assign(Object.assign({}, outputTarget), { excludeComponents: outputTarget.excludeComponents || [], componentModels: outputTarget.componentModels || [], includePolyfills: (_a = outputTarget.includePolyfills) !== null && _a !== void 0 ? _a : true, includeDefineCustomElements: (_b = outputTarget.includeDefineCustomElements) !== null && _b !== void 0 ? _b : true, routerLinkComponents: outputTarget.routerLinkComponents || [], vetur: (_c = outputTarget.vetur) !== null && _c !== void 0 ? _c : false });
var _a, _b;
const results = Object.assign(Object.assign({}, outputTarget), { excludeComponents: outputTarget.excludeComponents || [], componentModels: outputTarget.componentModels || [], includePolyfills: (_a = outputTarget.includePolyfills) !== null && _a !== void 0 ? _a : true, includeDefineCustomElements: (_b = outputTarget.includeDefineCustomElements) !== null && _b !== void 0 ? _b : true, routerLinkComponents: outputTarget.routerLinkComponents || [] });
if (config.rootDir == null) {

@@ -257,8 +225,2 @@ throw new Error('rootDir is not set and it should be set by stencil itself');

}
if (outputTarget.vetur && !outputTarget.docsFile) {
throw new Error('docsFile is required when outputting Vetur files');
}
if (outputTarget.vetur && (!outputTarget.veturTagsFile || !outputTarget.veturAttributesFile)) {
throw new Error('veturTagsFile and veturAttributesFile are required when outputting Vetur file');
}
if (outputTarget.directivesProxyFile && !path.isAbsolute(outputTarget.directivesProxyFile)) {

@@ -265,0 +227,0 @@ results.proxiesFile = normalizePath(path.join(config.rootDir, outputTarget.proxiesFile));

{
"name": "@stencil/vue-output-target",
"version": "0.2.0-0",
"version": "0.2.0",
"description": "Vue output target for @stencil/core components.",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc