@blitz/textmate
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -26,4 +26,4 @@ import { DefinitionLocation } from './definition-location'; | ||
/** | ||
* The name or location of the language configuration file. If not provided, the `base` will be the `id` | ||
* of the language definition and the file will be `language-configuration.json`. | ||
* The name or location of the language configuration file. If not provided, the `base` will be the | ||
* base of the `grammar` and the file will be `language-configuration.json`. | ||
*/ | ||
@@ -30,0 +30,0 @@ configuration?: string | DefinitionLocation; |
@@ -51,9 +51,11 @@ "use strict"; | ||
} | ||
// If the base is not set for the configuration file, use the base from the grammar or the language identifier | ||
const base = typeof definition.grammar === 'object' ? definition.grammar.base : definition.language; | ||
if (!definition.configuration) { | ||
// The default configuration name is `language-configuration.json`. | ||
return path.join(definition.language, 'language-configuration.json'); | ||
return path.join(base, 'language-configuration.json'); | ||
} | ||
if (typeof definition.configuration === 'string') { | ||
// If the configuration name is of type `string`, concatenate with the `language`. | ||
return path.join(definition.language, definition.configuration); | ||
return path.join(base || definition.language, definition.configuration); | ||
} | ||
@@ -60,0 +62,0 @@ // If the `configuration` is defined and not a `string`, it has to be a definition location object. |
{ | ||
"name": "@blitz/textmate", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "TextMate Grammars for StackBlitz", | ||
@@ -43,3 +43,4 @@ "license": "MIT", | ||
"files": [ | ||
"source/test/**/*" | ||
"source/test/**/*", | ||
"!source/test/helpers/**/*" | ||
], | ||
@@ -46,0 +47,0 @@ "typescript": { |
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
1424774
43016