@blitz/textmate

中文文档
0.4.11发布于 2025/10/07MITTypeScriptCommonJS零依赖近 30 天下载 1881

TextMate Grammars for StackBlitz

原始使用文档
文档目录8 节
  1. Install
  2. API
  3. languages
  4. grammars
  5. getGrammarLocation(definition)
  6. getLanguageConfigurationLocation(definition)
  7. isGrammarDefinition(definition)
  8. isLanguageDefinition(definition)

@blitz/textmate

CI

TextMate Grammars for StackBlitz

Install

$ npm install @blitz/textmate

API

languages

List of TextMate grammar LanguageDefinitions.

grammars

List of TextMate grammar GrammarDefinitions.

getGrammarLocation(definition)

Retrieve the location of the grammar file for the provided definition.

definition

Type: object

Definition to retrieve the grammar location for.

getLanguageConfigurationLocation(definition)

Retrieve the location of the language configuration file for the provided language definition.

definition

Type: object

Language definition to retrieve the language configuration location for.

isGrammarDefinition(definition)

Check if the provided definition is a GrammarDefinition.

definition

Type: object

The definition to check for.

isLanguageDefinition(definition)

Check if the provided definition is a LanguageDefinition.

definition

Type: object

The definition to check for.

版本与发布记录

@blitz/textmate 共发布 19 个版本,首次发布于 2021/03/15;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.4.11latest2025/10/071.1 年前
0.4.102025/09/301.1 年前
0.4.92025/09/301.1 年前
0.4.82025/04/221.5 年前
0.4.72024/08/022 年前
0.4.62024/07/032 年前

关于 @blitz/textmate 的常见问题

@blitz/textmate 是什么?

TextMate Grammars for StackBlitz

如何安装 @blitz/textmate?

在项目目录运行 npm install @blitz/textmate,或使用 pnpm add / yarn add / bun add。

@blitz/textmate 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@blitz/textmate 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@blitz/textmate 可以商用吗?

@blitz/textmate 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@blitz/textmate 的下载量有多少?

根据 npm 官方下载统计,@blitz/textmate 在 2026/10/09 – 2026/11/07 这 30 天内被下载 1,881 次,日均约 63 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@blitz/textmate 还在维护吗?

最新版本 0.4.11 发布于 2025/10/07(1.1 年前);至今共发布 19 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/03/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。