init
This commit is contained in:
1
node_modules/prettier-plugin-go-template/lib/create-id-generator.d.ts
generated
vendored
Normal file
1
node_modules/prettier-plugin-go-template/lib/create-id-generator.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function createIdGenerator(): () => string;
|
||||
9
node_modules/prettier-plugin-go-template/lib/create-id-generator.js
generated
vendored
Normal file
9
node_modules/prettier-plugin-go-template/lib/create-id-generator.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createIdGenerator = void 0;
|
||||
const ulid_1 = require("ulid");
|
||||
function createIdGenerator() {
|
||||
return () => (0, ulid_1.ulid)();
|
||||
}
|
||||
exports.createIdGenerator = createIdGenerator;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWlkLWdlbmVyYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGUtaWQtZ2VuZXJhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLCtCQUE0QjtBQUU1QixTQUFnQixpQkFBaUI7SUFDL0IsT0FBTyxHQUFHLEVBQUUsQ0FBQyxJQUFBLFdBQUksR0FBRSxDQUFDO0FBQ3RCLENBQUM7QUFGRCw4Q0FFQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHVsaWQgfSBmcm9tIFwidWxpZFwiO1xuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlSWRHZW5lcmF0b3IoKTogKCkgPT4gc3RyaW5nIHtcbiAgcmV0dXJuICgpID0+IHVsaWQoKTtcbn1cbiJdfQ==
|
||||
15
node_modules/prettier-plugin-go-template/lib/index.d.ts
generated
vendored
Normal file
15
node_modules/prettier-plugin-go-template/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Parser, Printer, SupportLanguage } from "prettier";
|
||||
import { GoNode } from "./parse";
|
||||
export declare type PrettierPluginGoTemplateParserOptions = {
|
||||
goTemplateBracketSpacing: boolean;
|
||||
};
|
||||
export declare const options: {
|
||||
[K in keyof PrettierPluginGoTemplateParserOptions]: any;
|
||||
};
|
||||
export declare const languages: SupportLanguage[];
|
||||
export declare const parsers: {
|
||||
"go-template": Parser<GoNode>;
|
||||
};
|
||||
export declare const printers: {
|
||||
"go-template": Printer<GoNode>;
|
||||
};
|
||||
249
node_modules/prettier-plugin-go-template/lib/index.js
generated
vendored
Normal file
249
node_modules/prettier-plugin-go-template/lib/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
47
node_modules/prettier-plugin-go-template/lib/parse.d.ts
generated
vendored
Normal file
47
node_modules/prettier-plugin-go-template/lib/parse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import { Parser } from "prettier";
|
||||
export declare const parseGoTemplate: Parser<GoNode>["parse"];
|
||||
export declare type GoNode = GoRoot | GoBlock | GoInline | GoMultiBlock | GoUnformattable;
|
||||
export declare type GoBlockKeyword = "if" | "range" | "block" | "with" | "define" | "else" | "prettier-ignore-start" | "prettier-ignore-end" | "end";
|
||||
export declare type GoRoot = {
|
||||
type: "root";
|
||||
} & Omit<GoBlock, "type" | "keyword" | "parent" | "statement" | "id" | "startDelimiter" | "endDelimiter" | "start" | "end">;
|
||||
export interface GoBaseNode<Type extends string> {
|
||||
id: string;
|
||||
type: Type;
|
||||
index: number;
|
||||
length: number;
|
||||
parent: GoBlock | GoRoot | GoMultiBlock;
|
||||
}
|
||||
export interface GoBlock extends GoBaseNode<"block">, WithDelimiter {
|
||||
keyword: GoBlockKeyword;
|
||||
children: {
|
||||
[id: string]: GoNode;
|
||||
};
|
||||
start: GoInline;
|
||||
end: GoInline | null;
|
||||
content: string;
|
||||
aliasedContent: string;
|
||||
contentStart: number;
|
||||
}
|
||||
export interface GoMultiBlock extends GoBaseNode<"double-block"> {
|
||||
blocks: (GoBlock | GoMultiBlock)[];
|
||||
keyword: GoBlockKeyword;
|
||||
}
|
||||
export declare type GoSharedDelimiter = "%" | "-" | "";
|
||||
export declare type GoInlineStartDelimiter = "<" | "/*" | GoSharedDelimiter;
|
||||
export declare type GoInlineEndDelimiter = ">" | "*/" | GoSharedDelimiter;
|
||||
export interface GoUnformattable extends GoBaseNode<"unformattable"> {
|
||||
content: string;
|
||||
}
|
||||
export interface WithDelimiter {
|
||||
startDelimiter: GoInlineStartDelimiter;
|
||||
endDelimiter: GoInlineEndDelimiter;
|
||||
}
|
||||
export interface GoInline extends GoBaseNode<"inline">, WithDelimiter {
|
||||
statement: string;
|
||||
}
|
||||
export declare function isInline(node: GoNode): node is GoInline;
|
||||
export declare function isBlock(node: GoNode): node is GoBlock;
|
||||
export declare function isMultiBlock(node: GoNode): node is GoMultiBlock;
|
||||
export declare function isRoot(node: GoNode): node is GoRoot;
|
||||
export declare function isUnformattable(node: GoNode): node is GoRoot;
|
||||
183
node_modules/prettier-plugin-go-template/lib/parse.js
generated
vendored
Normal file
183
node_modules/prettier-plugin-go-template/lib/parse.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user