shiki-templ
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,49 +0,11 @@ | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
// src/index.js | ||
var src_exports = {}; | ||
__export(src_exports, { | ||
templGrammar: () => templGrammar, | ||
templLang: () => templLang | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
var import_fs = __toESM(require("fs")); | ||
var import_path = __toESM(require("path")); | ||
var grammarPath = import_path.default.join(__dirname, "../grammars/templ.tmLanguage.json"); | ||
var templGrammar = JSON.parse(import_fs.default.readFileSync(grammarPath, "utf-8")); | ||
// src/index.cjs.js | ||
var fs = require("fs"); | ||
var path = require("path"); | ||
var grammarPath = path.join(__dirname, "../grammars/templ.tmLanguage.json"); | ||
var templGrammar = JSON.parse(fs.readFileSync(grammarPath, "utf-8")); | ||
var templLang = { | ||
name: "templ", | ||
scopeName: "source.templ", | ||
...templGrammar | ||
grammar: templGrammar | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
templGrammar, | ||
templLang | ||
}); | ||
module.exports = { templGrammar, templLang }; |
// src/index.js | ||
import fs from "fs"; | ||
import path from "path"; | ||
import { fileURLToPath } from "url"; | ||
var __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
var grammarPath = path.join(__dirname, "../grammars/templ.tmLanguage.json"); | ||
@@ -9,3 +11,3 @@ var templGrammar = JSON.parse(fs.readFileSync(grammarPath, "utf-8")); | ||
scopeName: "source.templ", | ||
...templGrammar | ||
grammar: templGrammar | ||
}; | ||
@@ -12,0 +14,0 @@ export { |
import { LanguageRegistration } from "shiki"; | ||
declare module "@indaco/templ-grammar" { | ||
declare module "shiki-templ" { | ||
export const templGrammar: { | ||
// Define the type structure of the grammar | ||
[key: string]: any; | ||
@@ -7,0 +6,0 @@ }; |
{ | ||
"name": "shiki-templ", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A TextMate grammar for Templ to be used with Shiki.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
<div align="center"> | ||
<h1>shiki-templ</h1> | ||
| ||
<a href="https://www.npmjs.com/package/@indaco/shiki-templ" target="_blank"><img src="https://img.shields.io/npm/v/@indaco/shiki-templ.svg?style=flat" alt="NPM Package" /></a> | ||
<a href="https://www.npmjs.com/package/shiki-templ" target="_blank"><img src="https://img.shields.io/npm/v/shiki-templ.svg?style=flat" alt="NPM Package" /></a> | ||
<a href="https://github.com/indaco/shiki-templ/blob/main/LICENSE" target="_blank"> | ||
@@ -6,0 +6,0 @@ <img src="https://img.shields.io/badge/license-mit-blue?style=flat-square&logo=none" alt="license" /> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74669
2293