mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
Split out ts syntax and grammar to ts basics
This commit is contained in:
@@ -30,6 +30,7 @@ const extensions = [
|
||||
'extension-editing',
|
||||
'markdown',
|
||||
'typescript',
|
||||
'typescript-basics',
|
||||
'php',
|
||||
'javascript',
|
||||
'css',
|
||||
|
||||
4
extensions/typescript-basics/.vscodeignore
Normal file
4
extensions/typescript-basics/.vscodeignore
Normal file
@@ -0,0 +1,4 @@
|
||||
build/**
|
||||
src/**
|
||||
test/**
|
||||
tsconfig.json
|
||||
7
extensions/typescript-basics/OSSREADME.json
Normal file
7
extensions/typescript-basics/OSSREADME.json
Normal file
@@ -0,0 +1,7 @@
|
||||
[{
|
||||
"name": "TypeScript-TmLanguage",
|
||||
"version": "0.1.8",
|
||||
"license": "MIT",
|
||||
"repositoryURL": "https://github.com/Microsoft/TypeScript-TmLanguage",
|
||||
"description": "The files syntaxes/TypeScript.tmLanguage.json and syntaxes/TypeScriptReact.tmLanguage.json were derived from TypeScript.tmLanguage and TypeScriptReact.tmLanguage in https://github.com/Microsoft/TypeScript-TmLanguage."
|
||||
}]
|
||||
34
extensions/typescript-basics/language-configuration.json
Normal file
34
extensions/typescript-basics/language-configuration.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"comments": {
|
||||
"lineComment": "//",
|
||||
"blockComment": [ "/*", "*/" ]
|
||||
},
|
||||
"brackets": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
{ "open": "{", "close": "}" },
|
||||
{ "open": "[", "close": "]" },
|
||||
{ "open": "(", "close": ")" },
|
||||
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "\"", "close": "\"", "notIn": ["string"] },
|
||||
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
|
||||
{ "open": "/**", "close": " */", "notIn": ["string"] }
|
||||
],
|
||||
"surroundingPairs": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["'", "'"],
|
||||
["\"", "\""],
|
||||
["`", "`"]
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*//\\s*#?region\\b",
|
||||
"end": "^\\s*//\\s*#?endregion\\b"
|
||||
}
|
||||
}
|
||||
}
|
||||
60
extensions/typescript-basics/package.json
Normal file
60
extensions/typescript-basics/package.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"name": "typescript-basics",
|
||||
"description": "%description%",
|
||||
"displayName": "%displayName%",
|
||||
"version": "0.10.1",
|
||||
"author": "vscode",
|
||||
"publisher": "vscode",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"vscode": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"update-grammar": "node ./build/update-grammars.js"
|
||||
},
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
"id": "typescript",
|
||||
"aliases": [
|
||||
"TypeScript",
|
||||
"ts",
|
||||
"typescript"
|
||||
],
|
||||
"extensions": [
|
||||
".ts"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
},
|
||||
{
|
||||
"id": "typescriptreact",
|
||||
"aliases": [
|
||||
"TypeScript React",
|
||||
"tsx"
|
||||
],
|
||||
"extensions": [
|
||||
".tsx"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
{
|
||||
"language": "typescript",
|
||||
"scopeName": "source.ts",
|
||||
"path": "./syntaxes/TypeScript.tmLanguage.json"
|
||||
},
|
||||
{
|
||||
"language": "typescriptreact",
|
||||
"scopeName": "source.tsx",
|
||||
"path": "./syntaxes/TypeScriptReact.tmLanguage.json",
|
||||
"embeddedLanguages": {
|
||||
"meta.tag.tsx": "jsx-tags",
|
||||
"meta.tag.without-attributes.tsx": "jsx-tags",
|
||||
"meta.tag.attributes.tsx": "typescriptreact",
|
||||
"meta.embedded.expression.tsx": "typescriptreact"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
4
extensions/typescript-basics/package.nls.json
Normal file
4
extensions/typescript-basics/package.nls.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"displayName": "TypeScript Language Basics",
|
||||
"description": "Provides syntax highlighting and basic language support for TypeScript."
|
||||
}
|
||||
@@ -21,8 +21,7 @@
|
||||
"@types/semver": "5.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript ./tsconfig.json",
|
||||
"update-grammar": "node ./build/update-grammars.js"
|
||||
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript ./tsconfig.json"
|
||||
},
|
||||
"activationEvents": [
|
||||
"onLanguage:javascript",
|
||||
@@ -40,49 +39,6 @@
|
||||
],
|
||||
"main": "./out/extension",
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
"id": "typescript",
|
||||
"aliases": [
|
||||
"TypeScript",
|
||||
"ts",
|
||||
"typescript"
|
||||
],
|
||||
"extensions": [
|
||||
".ts"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
},
|
||||
{
|
||||
"id": "typescriptreact",
|
||||
"aliases": [
|
||||
"TypeScript React",
|
||||
"tsx"
|
||||
],
|
||||
"extensions": [
|
||||
".tsx"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
{
|
||||
"language": "typescript",
|
||||
"scopeName": "source.ts",
|
||||
"path": "./syntaxes/TypeScript.tmLanguage.json"
|
||||
},
|
||||
{
|
||||
"language": "typescriptreact",
|
||||
"scopeName": "source.tsx",
|
||||
"path": "./syntaxes/TypeScriptReact.tmLanguage.json",
|
||||
"embeddedLanguages": {
|
||||
"meta.tag.tsx": "jsx-tags",
|
||||
"meta.tag.without-attributes.tsx": "jsx-tags",
|
||||
"meta.tag.attributes.tsx": "typescriptreact",
|
||||
"meta.embedded.expression.tsx": "typescriptreact"
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"title": "%configuration.typescript%",
|
||||
|
||||
Reference in New Issue
Block a user