Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

volar-service-pug

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

volar-service-pug - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

2

out/empty.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
console.warn('volar-service-pug: This plugin is not support on web yet.');
console.warn('volar-service-pug: this module is not yet supported for web.');
exports.default = () => () => ({});
//# sourceMappingURL=empty.js.map

@@ -1,5 +0,9 @@

import type { Service, ServiceContext } from '@volar/language-service';
import type { InjectionKey, Service, ServiceContext } from '@volar/language-service';
import type * as html from 'vscode-html-languageservice';
import { TextDocument } from 'vscode-languageserver-textdocument';
import * as pug from './languageService';
export declare const rulesInjectionKey: InjectionKey<{
pugDocument: pug.PugDocument;
languageService: pug.LanguageService;
}>;
export interface PluginInstance extends ReturnType<Service> {

@@ -6,0 +10,0 @@ getHtmlLs: () => html.LanguageService;

@@ -29,5 +29,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.rulesInjectionKey = void 0;
const volar_service_html_1 = __importDefault(require("volar-service-html"));
const language_service_1 = require("@volar/language-service");
const pug = __importStar(require("./languageService"));
exports.rulesInjectionKey = Symbol();
exports.default = () => (context) => {

@@ -41,16 +43,17 @@ if (!context) {

return {
rules: {
provide: {
[exports.rulesInjectionKey](document) {
return worker(document, (pugDocument) => {
return {
pugDocument,
languageService: pugLs,
};
});
},
},
},
...htmlPlugin,
getPugLs: () => pugLs,
getPugDocument,
resolveRuleContext(context) {
worker(context.document, (pugDocument) => {
if (pugDocument.ast) {
context.pug = {
rootNode: pugDocument.ast,
languageService: pugLs,
};
}
});
return context;
},
provideCompletionItems(document, position, _) {

@@ -57,0 +60,0 @@ return worker(document, (pugDocument) => {

{
"name": "volar-service-pug",
"version": "0.0.0",
"version": "0.0.1",
"main": "out/index.js",
"license": "MIT",
"files": [
"rules.d.ts",
"out/**/*.js",

@@ -20,3 +19,3 @@ "out/**/*.d.ts"

"pug-parser": "^6.0.0",
"volar-service-html": "0.0.0",
"volar-service-html": "0.0.1",
"vscode-html-languageservice": "^5.0.4",

@@ -33,3 +32,3 @@ "vscode-languageserver-textdocument": "^1.0.8",

},
"gitHead": "1011561ac4bbf79c53c3b80c27692569bf861519"
"gitHead": "5bf5152f076f25cb1ddbc7aa6978a8d1c7009fd6"
}
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