This commit is contained in:
2019-09-17 13:20:42 -04:00
parent d211d1dc34
commit bef10ce4c9
8352 changed files with 568242 additions and 51 deletions
+12
View File
@@ -0,0 +1,12 @@
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js 8.x'
- script: |
npm ci
displayName: 'Install and test'
+23
View File
@@ -0,0 +1,23 @@
vscode-generator-code
The MIT License (MIT)
Copyright (c) Microsoft Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+41
View File
@@ -0,0 +1,41 @@
# Yo Code - Extension and Customization Generator
[![Build Status](https://dev.azure.com/ms/vscode-generator-code/_apis/build/status/Microsoft.vscode-generator-code)](https://dev.azure.com/ms/vscode-generator-code/_build/latest?definitionId=17)
We have written a Yeoman generator to help get you started. We plan to add templates for most extension/customization types into this.
## Install the Generator
Install Yeoman and the VS Code Extension generator:
```bash
npm install -g yo generator-code
```
## Run Yo Code
The Yeoman generator will walk you through the steps required to create your customization or extension prompting for the required information.
To launch the generator simply type:
```bash
yo code
```
![The command generator](yocode.png)
## Generator Output
These templates will
* Create a base folder structure
* Template out a rough `package.json`
* Import any assets required for your extension e.g. tmBundles or the VS Code Library
* For Extensions: Set-up `launch.json` for running your extension and attaching to a process
## History
* 1.0.0: Generates a VS Code extension for TypeScript 2.0.3
* 0.10.x: Generates a VS Code extension for TypeScript 1.8.10
## License
[MIT](LICENSE)
+30
View File
@@ -0,0 +1,30 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
'use strict';
var request = require('request');
var fallbackVersion = '^1.36.0';
var promise = new Promise(function(resolve, reject) {
request.get('https://vscode-update.azurewebsites.net/api/releases/stable', { headers: { "X-API-Version": "2" } }, function(error, response, body) {
if (!error && response.statusCode === 200) {
try {
var tagsAndCommits = JSON.parse(body);
if (Array.isArray(tagsAndCommits) && tagsAndCommits.length > 0) {
var segments = tagsAndCommits[0].version.split('.');
if (segments.length === 3) {
resolve('^' + segments[0] + '.' + segments[1] + '.0');
return;
}
}
} catch (e) {
console.log('Problem parsing version: ' + body, e);
}
} else {
console.log('Unable to fetch latest vscode version: ' + (error || ('Status code: ' + response.statusCode + ', ' + body)));
}
resolve(fallbackVersion);
});
});
module.exports.getLatestVSCodeVersion = function() { return promise; };
@@ -0,0 +1,125 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
'use strict';
var path = require('path');
var fs = require('fs');
var plistParser = require('fast-plist');
var request = require('request');
function convertGrammar(location, extensionConfig) {
extensionConfig.languageId = '';
extensionConfig.languageName = '';
extensionConfig.languageScopeName = '';
extensionConfig.languageExtensions = [];
if (!location) {
extensionConfig.languageContent = '';
return Promise.resolve();
}
if (location.match(/\w*:\/\//)) {
// load from url
return new Promise(function (resolve, reject) {
request(location, function (error, response, body) {
if (!error && response.statusCode == 200) {
var contentDisposition = response.headers['content-disposition'];
var fileName = '';
if (contentDisposition) {
var fileNameMatch = contentDisposition.match(/filename="([^"]*)/);
if (fileNameMatch) {
fileName = fileNameMatch[1];
}
}
processContent(extensionConfig, fileName, body).then(resolve, reject);
} else {
reject("Problems loading language definition file: " + error);
}
});
});
} else {
// load from disk
var body = null;
// trim the spaces of the location path
location = location.trim()
try {
body = fs.readFileSync(location);
} catch (error) {
return Promise.reject("Problems loading language definition file: " + error.message);
}
if (body) {
return processContent(extensionConfig, path.basename(location), body.toString());
} else {
return Promise.reject("Problems loading language definition file: Not found");
}
}
}
function processContent(extensionConfig, fileName, body) {
var languageInfo;
if (path.extname(fileName) === '.json') {
try {
languageInfo = JSON.parse(body);
} catch (e) {
return Promise.reject("Language definition file could not be parsed asn JSON: " + e.toString());
}
} else {
if (body.indexOf('<!DOCTYPE plist') === -1) {
return Promise.reject("Language definition file does not contain 'DOCTYPE plist'. Make sure the file content is really plist-XML.");
}
try {
languageInfo = plistParser.parse(body);
} catch (e) {
return Promise.reject("Language definition file could not be parsed: " + e.toString());
}
}
if (!languageInfo) {
return Promise.reject("Language definition file could not be parsed. Make sure it is a valid plist or JSON file.");
}
extensionConfig.languageName = languageInfo.name || '';
// evaluate language id
var languageId = '';
var languageScopeName;
if (languageInfo.scopeName) {
languageScopeName = languageInfo.scopeName;
var lastIndexOfDot = languageInfo.scopeName.lastIndexOf('.');
if (lastIndexOfDot) {
languageId = languageInfo.scopeName.substring(lastIndexOfDot + 1);
}
}
if (!languageId && fileName) {
var lastIndexOfDot2 = fileName.lastIndexOf('.');
if (lastIndexOfDot2 && fileName.substring(lastIndexOfDot2 + 1) == 'tmLanguage') {
languageId = fileName.substring(0, lastIndexOfDot2);
}
}
if (!languageId && languageInfo.name) {
languageId = languageInfo.name.toLowerCase().replace(/[^\w-_]/, '');
}
if (!fileName) {
fileName = languageId + '.tmLanguage';
}
extensionConfig.languageFileName = fileName;
extensionConfig.languageId = languageId;
extensionConfig.name = languageId;
extensionConfig.languageScopeName = languageScopeName;
// evaluate file extensions
if (Array.isArray(languageInfo.fileTypes)) {
extensionConfig.languageExtensions = languageInfo.fileTypes.map(function (ft) { return '.' + ft; });
} else {
extensionConfig.languageExtensions = languageId ? ['.' + languageId] : [];
}
extensionConfig.languageContent = body;
return Promise.resolve(extensionConfig);
};
exports.convertGrammar = convertGrammar;
+752
View File
@@ -0,0 +1,752 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
'use strict';
let Generator = require('yeoman-generator');
let yosay = require('yosay');
let path = require('path');
let validator = require('./validator');
let snippetConverter = require('./snippetConverter');
let themeConverter = require('./themeConverter');
let grammarConverter = require('./grammarConverter');
let env = require('./env');
let childProcess = require('child_process');
let chalk = require('chalk');
let sanitize = require("sanitize-filename");
let localization = require('./localization');
module.exports = class extends Generator {
constructor(args, opts) {
super(args, opts);
this.option('extensionType', { type: String });
this.option('extensionName', { type: String });
this.option('extensionDescription', { type: String });
this.option('extensionDisplayName', { type: String });
this.option('extensionParam', { type: String });
this.option('extensionParam2', { type: String });
this.extensionConfig = Object.create(null);
this.extensionConfig.installDependencies = false;
}
initializing() {
// Welcome
this.log(yosay('Welcome to the Visual Studio Code Extension generator!'));
// evaluateEngineVersion
let extensionConfig = this.extensionConfig;
return env.getLatestVSCodeVersion().then(version => { extensionConfig.vsCodeEngine = version; });
}
prompting() {
let generator = this;
let prompts = {
// Ask for extension type
askForType: () => {
let extensionType = generator.options['extensionType'];
if (extensionType) {
let extensionTypes = ['colortheme', 'language', 'snippets', 'command-ts', 'command-js', 'extensionpack'];
if (extensionTypes.indexOf(extensionType) !== -1) {
generator.extensionConfig.type = 'ext-' + extensionType;
} else {
generator.log("Invalid extension type: " + extensionType + '. Possible types are :' + extensionTypes.join(', '));
}
return Promise.resolve();
}
return generator.prompt({
type: 'list',
name: 'type',
message: 'What type of extension do you want to create?',
choices: [{
name: 'New Extension (TypeScript)',
value: 'ext-command-ts'
},
{
name: 'New Extension (JavaScript)',
value: 'ext-command-js'
},
{
name: 'New Color Theme',
value: 'ext-colortheme'
},
{
name: 'New Language Support',
value: 'ext-language'
},
{
name: 'New Code Snippets',
value: 'ext-snippets'
},
{
name: 'New Keymap',
value: 'ext-keymap'
},
{
name: 'New Extension Pack',
value: 'ext-extensionpack'
},
{
name: 'New Language Pack (Localization)',
value: 'ext-localization'
}
]
}).then(typeAnswer => {
generator.extensionConfig.type = typeAnswer.type;
});
},
askForThemeInfo: () => {
if (generator.extensionConfig.type !== 'ext-colortheme') {
return Promise.resolve();
}
generator.extensionConfig.isCustomization = true;
return generator.prompt({
type: 'list',
name: 'themeImportType',
message: 'Do you want to import or convert an existing TextMate color theme?',
choices: [
{
name: 'No, start fresh',
value: 'new'
},
{
name: 'Yes, import an existing theme but keep it as tmTheme file.',
value: 'import-keep'
},
{
name: 'Yes, import an existing theme and inline it in the Visual Studio Code color theme file.',
value: 'import-inline'
}
]
}).then(answer => {
let inline = true;
let type = answer.themeImportType;
if (type === 'import-keep' || type === 'import-inline') {
generator.log("Enter the location (URL (http, https) or file name) of the tmTheme file, e.g., http://www.monokai.nl/blog/wp-content/asdev/Monokai.tmTheme.");
return generator.prompt({
type: 'input',
name: 'themeURL',
message: 'URL or file name to import:'
}).then(urlAnswer => {
return themeConverter.convertTheme(urlAnswer.themeURL, generator.extensionConfig, type === 'import-inline', generator);
});
} else {
return themeConverter.convertTheme(null, generator.extensionConfig, false, generator);
}
});
},
askForLanguageInfo: () => {
if (generator.extensionConfig.type !== 'ext-language') {
return Promise.resolve();
}
generator.extensionConfig.isCustomization = true;
generator.log("Enter the URL (http, https) or the file path of the tmLanguage grammar or press ENTER to start with a new grammar.");
return generator.prompt({
type: 'input',
name: 'tmLanguageURL',
message: 'URL or file to import, or none for new:',
}).then(urlAnswer => {
return grammarConverter.convertGrammar(urlAnswer.tmLanguageURL, generator.extensionConfig);
});
},
askForSnippetsInfo: () => {
if (generator.extensionConfig.type !== 'ext-snippets') {
return Promise.resolve();
}
generator.extensionConfig.isCustomization = true;
let extensionParam = generator.options['extensionParam'];
if (extensionParam) {
let count = snippetConverter.processSnippetFolder(extensionParam, generator);
if (count <= 0) {
generator.log('')
}
return Promise.resolve();
}
generator.log("Folder location that contains Text Mate (.tmSnippet) and Sublime snippets (.sublime-snippet) or press ENTER to start with a new snippet file.");
let snippetPrompt = () => {
return generator.prompt({
type: 'input',
name: 'snippetPath',
message: 'Folder name for import or none for new:'
}).then(snippetAnswer => {
let count = 0;
let snippetPath = snippetAnswer.snippetPath;
if (typeof snippetPath === 'string' && snippetPath.length > 0) {
snippetConverter.processSnippetFolder(snippetPath, generator);
} else {
generator.extensionConfig.snippets = {};
generator.extensionConfig.languageId = null;
}
if (count < 0) {
return snippetPrompt();
}
});
};
return snippetPrompt();
},
askForLocalizationLanguageId: () => {
return localization.askForLanguageId(generator);
},
askForLocalizationLanguageName: () => {
return localization.askForLanguageName(generator);
},
askForLocalizedLocalizationLanguageName: () => {
return localization.askForLocalizedLanguageName(generator);
},
askForExtensionPackInfo: () => {
if (generator.extensionConfig.type !== 'ext-extensionpack') {
return Promise.resolve();
}
generator.extensionConfig.isCustomization = true;
const defaultExtensionList = ['publisher.extensionName'];
const getExtensionList = () =>
new Promise((resolve, reject) => {
childProcess.exec(
'code --list-extensions',
(error, stdout, stderr) => {
if (error) {
generator.env.error(error);
} else {
let out = stdout.trim();
if (out.length > 0) {
generator.extensionConfig.extensionList = out.split(/\s/);
}
}
resolve();
}
);
});
const extensionParam = generator.options['extensionParam'];
if (extensionParam) {
switch (extensionParam.toString().trim().toLowerCase()) {
case 'n':
generator.extensionConfig.extensionList = defaultExtensionList;
return Promise.resolve();
case 'y':
return getExtensionList();
}
}
return generator.prompt({
type: 'confirm',
name: 'addExtensions',
message: 'Add the currently installed extensions to the extension pack?',
default: true
}).then(addExtensionsAnswer => {
generator.extensionConfig.extensionList = defaultExtensionList;
if (addExtensionsAnswer.addExtensions) {
return getExtensionList();
}
});
},
// Ask for extension display name ("displayName" in package.json)
askForExtensionDisplayName: () => {
let extensionDisplayName = generator.options['extensionDisplayName'];
if (extensionDisplayName) {
generator.extensionConfig.displayName = extensionDisplayName;
return Promise.resolve();
}
return generator.prompt({
type: 'input',
name: 'displayName',
message: 'What\'s the name of your extension?',
default: generator.extensionConfig.displayName
}).then(displayNameAnswer => {
generator.extensionConfig.displayName = displayNameAnswer.displayName;
});
},
// Ask for extension id ("name" in package.json)
askForExtensionId: () => {
let extensionName = generator.options['extensionName'];
if (extensionName) {
generator.extensionConfig.name = extensionName;
return Promise.resolve();
}
let def = generator.extensionConfig.name;
if (!def && generator.extensionConfig.displayName) {
def = generator.extensionConfig.displayName.toLowerCase().replace(/[^a-z0-9]/g, '-');
}
if (!def) {
def == '';
}
return generator.prompt({
type: 'input',
name: 'name',
message: 'What\'s the identifier of your extension?',
default: def,
validate: validator.validateExtensionId
}).then(nameAnswer => {
generator.extensionConfig.name = nameAnswer.name;
});
},
// Ask for extension description
askForExtensionDescription: () => {
let extensionDescription = generator.options['extensionDescription'];
if (extensionDescription) {
generator.extensionConfig.description = extensionDescription;
return Promise.resolve();
}
return generator.prompt({
type: 'input',
name: 'description',
message: 'What\'s the description of your extension?'
}).then(descriptionAnswer => {
generator.extensionConfig.description = descriptionAnswer.description;
});
},
askForJavaScriptInfo: () => {
if (generator.extensionConfig.type !== 'ext-command-js') {
return Promise.resolve();
}
generator.extensionConfig.checkJavaScript = false;
return generator.prompt({
type: 'confirm',
name: 'checkJavaScript',
message: 'Enable JavaScript type checking in \'jsconfig.json\'?',
default: false
}).then(strictJavaScriptAnswer => {
generator.extensionConfig.checkJavaScript = strictJavaScriptAnswer.checkJavaScript;
});
},
askForGit: () => {
if (['ext-command-ts', 'ext-command-js'].indexOf(generator.extensionConfig.type) === -1) {
return Promise.resolve();
}
return generator.prompt({
type: 'confirm',
name: 'gitInit',
message: 'Initialize a git repository?',
default: true
}).then(gitAnswer => {
generator.extensionConfig.gitInit = gitAnswer.gitInit;
});
},
askForThemeName: () => {
if (generator.extensionConfig.type !== 'ext-colortheme') {
return Promise.resolve();
}
return generator.prompt({
type: 'input',
name: 'themeName',
message: 'What\'s the name of your theme shown to the user?',
default: generator.extensionConfig.themeName,
validate: validator.validateNonEmpty
}).then(nameAnswer => {
generator.extensionConfig.themeName = nameAnswer.themeName;
});
},
askForBaseTheme: () => {
if (generator.extensionConfig.type !== 'ext-colortheme') {
return Promise.resolve();
}
return generator.prompt({
type: 'list',
name: 'themeBase',
message: 'Select a base theme:',
choices: [{
name: "Dark",
value: "vs-dark"
},
{
name: "Light",
value: "vs"
},
{
name: "High Contrast",
value: "hc-black"
}
]
}).then(themeBase => {
generator.extensionConfig.themeBase = themeBase.themeBase;
});
},
askForLanguageId: () => {
if (generator.extensionConfig.type !== 'ext-language') {
return Promise.resolve();
}
generator.log('Enter the id of the language. The id is an identifier and is single, lower-case name such as \'php\', \'javascript\'');
return generator.prompt({
type: 'input',
name: 'languageId',
message: 'Language id:',
default: generator.extensionConfig.languageId,
}).then(idAnswer => {
generator.extensionConfig.languageId = idAnswer.languageId;
});
},
askForLanguageName: () => {
if (generator.extensionConfig.type !== 'ext-language') {
return Promise.resolve();
}
generator.log('Enter the name of the language. The name will be shown in the VS Code editor mode selector.');
return generator.prompt({
type: 'input',
name: 'languageName',
message: 'Language name:',
default: generator.extensionConfig.languageName,
}).then(nameAnswer => {
generator.extensionConfig.languageName = nameAnswer.languageName;
});
},
askForLanguageExtensions: () => {
if (generator.extensionConfig.type !== 'ext-language') {
return Promise.resolve();
}
generator.log('Enter the file extensions of the language. Use commas to separate multiple entries (e.g. .ruby, .rb)');
return generator.prompt({
type: 'input',
name: 'languageExtensions',
message: 'File extensions:',
default: generator.extensionConfig.languageExtensions.join(', '),
}).then(extAnswer => {
generator.extensionConfig.languageExtensions = extAnswer.languageExtensions.split(',').map(e => { return e.trim(); });
});
},
askForLanguageScopeName: () => {
if (generator.extensionConfig.type !== 'ext-language') {
return Promise.resolve();
}
generator.log('Enter the root scope name of the grammar (e.g. source.ruby)');
return generator.prompt({
type: 'input',
name: 'languageScopeName',
message: 'Scope names:',
default: generator.extensionConfig.languageScopeName,
}).then(extAnswer => {
generator.extensionConfig.languageScopeName = extAnswer.languageScopeName;
});
},
askForSnippetLanguage: () => {
if (generator.extensionConfig.type !== 'ext-snippets') {
return Promise.resolve();
}
let extensionParam2 = generator.options['extensionParam2'];
if (extensionParam2) {
generator.extensionConfig.languageId = extensionParam2;
return Promise.resolve();
}
generator.log('Enter the language for which the snippets should appear. The id is an identifier and is single, lower-case name such as \'php\', \'javascript\'');
return generator.prompt({
type: 'input',
name: 'languageId',
message: 'Language id:',
default: generator.extensionConfig.languageId
}).then(idAnswer => {
generator.extensionConfig.languageId = idAnswer.languageId;
});
},
askForPackageManager: () => {
if (['ext-command-ts', 'ext-command-js', 'ext-localization'].indexOf(generator.extensionConfig.type) === -1) {
return Promise.resolve();
}
generator.extensionConfig.pkgManager = 'npm';
return generator.prompt({
type: 'list',
name: 'pkgManager',
message: 'Which package manager to use?',
choices: [
{
name: 'npm',
value: 'npm'
},
{
name: 'yarn',
value: 'yarn'
}
]
}).then(pckgManagerAnswer => {
generator.extensionConfig.pkgManager = pckgManagerAnswer.pkgManager;
});
},
};
// run all prompts in sequence. Results can be ignored.
let result = Promise.resolve();
for (let taskName in prompts) {
let prompt = prompts[taskName];
result = result.then(_ => {
return new Promise((s, r) => {
setTimeout(_ => prompt().then(s, r), 0); // set timeout is required, otherwise node hangs
});
})
}
return result;
}
// Write files
writing() {
this.sourceRoot(path.join(__dirname, './templates/' + this.extensionConfig.type));
switch (this.extensionConfig.type) {
case 'ext-colortheme':
this._writingColorTheme();
break;
case 'ext-language':
this._writingLanguage();
break;
case 'ext-snippets':
this._writingSnippets();
break;
case 'ext-keymap':
this._writingKeymaps();
break;
case 'ext-command-ts':
this._writingCommandTs();
break;
case 'ext-command-js':
this._writingCommandJs();
break;
case 'ext-extensionpack':
this._writingExtensionPack();
break;
case 'ext-localization':
localization.writingLocalizationExtension(this);
break;
default:
//unknown project type
break;
}
}
// Write Color Theme Extension
_writingExtensionPack() {
let context = this.extensionConfig;
this.fs.copy(this.sourceRoot() + '/vscode', context.name + '/.vscode');
this.fs.copyTpl(this.sourceRoot() + '/package.json', context.name + '/package.json', context);
this.fs.copyTpl(this.sourceRoot() + '/vsc-extension-quickstart.md', context.name + '/vsc-extension-quickstart.md', context);
this.fs.copyTpl(this.sourceRoot() + '/README.md', context.name + '/README.md', context);
this.fs.copyTpl(this.sourceRoot() + '/CHANGELOG.md', context.name + '/CHANGELOG.md', context);
this.fs.copy(this.sourceRoot() + '/vscodeignore', context.name + '/.vscodeignore');
if (this.extensionConfig.gitInit) {
this.fs.copy(this.sourceRoot() + '/gitignore', context.name + '/.gitignore');
this.fs.copy(this.sourceRoot() + '/gitattributes', context.name + '/.gitattributes');
}
}
// Write Color Theme Extension
_writingColorTheme() {
let context = this.extensionConfig;
if (context.tmThemeFileName) {
this.fs.copyTpl(this.sourceRoot() + '/themes/theme.tmTheme', context.name + '/themes/' + context.tmThemeFileName, context);
}
context.themeFileName = sanitize(context.themeName + '-color-theme.json');
if (context.themeContent) {
context.themeContent.name = context.themeName;
this.fs.copyTpl(this.sourceRoot() + '/themes/color-theme.json', context.name + '/themes/' + context.themeFileName, context);
} else {
if (context.themeBase === 'vs') {
this.fs.copyTpl(this.sourceRoot() + '/themes/new-light-color-theme.json', context.name + '/themes/' + context.themeFileName, context);
} else if (context.themeBase === 'hc') {
this.fs.copyTpl(this.sourceRoot() + '/themes/new-hc-color-theme.json', context.name + '/themes/' + context.themeFileName, context);
} else {
this.fs.copyTpl(this.sourceRoot() + '/themes/new-dark-color-theme.json', context.name + '/themes/' + context.themeFileName, context);
}
}
this.fs.copy(this.sourceRoot() + '/vscode', context.name + '/.vscode');
this.fs.copyTpl(this.sourceRoot() + '/package.json', context.name + '/package.json', context);
this.fs.copyTpl(this.sourceRoot() + '/vsc-extension-quickstart.md', context.name + '/vsc-extension-quickstart.md', context);
this.fs.copyTpl(this.sourceRoot() + '/README.md', context.name + '/README.md', context);
this.fs.copyTpl(this.sourceRoot() + '/CHANGELOG.md', context.name + '/CHANGELOG.md', context);
this.fs.copy(this.sourceRoot() + '/vscodeignore', context.name + '/.vscodeignore');
if (this.extensionConfig.gitInit) {
this.fs.copy(this.sourceRoot() + '/gitignore', context.name + '/.gitignore');
this.fs.copy(this.sourceRoot() + '/gitattributes', context.name + '/.gitattributes');
}
}
// Write Language Extension
_writingLanguage() {
let context = this.extensionConfig;
if (!context.languageContent) {
context.languageFileName = sanitize(context.languageId + '.tmLanguage.json');
this.fs.copyTpl(this.sourceRoot() + '/syntaxes/new.tmLanguage.json', context.name + '/syntaxes/' + context.languageFileName, context);
} else {
this.fs.copyTpl(this.sourceRoot() + '/syntaxes/language.tmLanguage', context.name + '/syntaxes/' + sanitize(context.languageFileName), context);
}
this.fs.copy(this.sourceRoot() + '/vscode', context.name + '/.vscode');
this.fs.copyTpl(this.sourceRoot() + '/package.json', context.name + '/package.json', context);
this.fs.copyTpl(this.sourceRoot() + '/README.md', context.name + '/README.md', context);
this.fs.copyTpl(this.sourceRoot() + '/CHANGELOG.md', context.name + '/CHANGELOG.md', context);
this.fs.copyTpl(this.sourceRoot() + '/vsc-extension-quickstart.md', context.name + '/vsc-extension-quickstart.md', context);
this.fs.copyTpl(this.sourceRoot() + '/language-configuration.json', context.name + '/language-configuration.json', context);
this.fs.copy(this.sourceRoot() + '/vscodeignore', context.name + '/.vscodeignore');
if (this.extensionConfig.gitInit) {
this.fs.copy(this.sourceRoot() + '/gitignore', context.name + '/.gitignore');
this.fs.copy(this.sourceRoot() + '/gitattributes', context.name + '/.gitattributes');
}
}
// Write Snippets Extension
_writingSnippets() {
let context = this.extensionConfig;
this.fs.copy(this.sourceRoot() + '/vscode', context.name + '/.vscode');
this.fs.copyTpl(this.sourceRoot() + '/package.json', context.name + '/package.json', context);
this.fs.copyTpl(this.sourceRoot() + '/vsc-extension-quickstart.md', context.name + '/vsc-extension-quickstart.md', context);
this.fs.copyTpl(this.sourceRoot() + '/README.md', context.name + '/README.md', context);
this.fs.copyTpl(this.sourceRoot() + '/CHANGELOG.md', context.name + '/CHANGELOG.md', context);
this.fs.copyTpl(this.sourceRoot() + '/snippets/snippets.json', context.name + '/snippets/snippets.json', context);
this.fs.copy(this.sourceRoot() + '/vscodeignore', context.name + '/.vscodeignore');
if (this.extensionConfig.gitInit) {
this.fs.copy(this.sourceRoot() + '/gitignore', context.name + '/.gitignore');
this.fs.copy(this.sourceRoot() + '/gitattributes', context.name + '/.gitattributes');
}
}
// Write Snippets Extension
_writingKeymaps() {
let context = this.extensionConfig;
this.fs.copy(this.sourceRoot() + '/vscode', context.name + '/.vscode');
this.fs.copyTpl(this.sourceRoot() + '/package.json', context.name + '/package.json', context);
this.fs.copyTpl(this.sourceRoot() + '/vsc-extension-quickstart.md', context.name + '/vsc-extension-quickstart.md', context);
this.fs.copyTpl(this.sourceRoot() + '/README.md', context.name + '/README.md', context);
this.fs.copyTpl(this.sourceRoot() + '/CHANGELOG.md', context.name + '/CHANGELOG.md', context);
this.fs.copy(this.sourceRoot() + '/vscodeignore', context.name + '/.vscodeignore');
if (this.extensionConfig.gitInit) {
this.fs.copy(this.sourceRoot() + '/gitignore', context.name + '/.gitignore');
this.fs.copy(this.sourceRoot() + '/gitattributes', context.name + '/.gitattributes');
}
}
// Write Command Extension (TypeScript)
_writingCommandTs() {
let context = this.extensionConfig;
this.fs.copy(this.sourceRoot() + '/vscode', context.name + '/.vscode');
this.fs.copy(this.sourceRoot() + '/src/test', context.name + '/src/test');
this.fs.copy(this.sourceRoot() + '/vscodeignore', context.name + '/.vscodeignore');
if (this.extensionConfig.gitInit) {
this.fs.copy(this.sourceRoot() + '/gitignore', context.name + '/.gitignore');
}
this.fs.copyTpl(this.sourceRoot() + '/README.md', context.name + '/README.md', context);
this.fs.copyTpl(this.sourceRoot() + '/CHANGELOG.md', context.name + '/CHANGELOG.md', context);
this.fs.copyTpl(this.sourceRoot() + '/vsc-extension-quickstart.md', context.name + '/vsc-extension-quickstart.md', context);
this.fs.copyTpl(this.sourceRoot() + '/tsconfig.json', context.name + '/tsconfig.json', context);
this.fs.copyTpl(this.sourceRoot() + '/src/extension.ts', context.name + '/src/extension.ts', context);
this.fs.copyTpl(this.sourceRoot() + '/package.json', context.name + '/package.json', context);
this.fs.copy(this.sourceRoot() + '/tslint.json', context.name + '/tslint.json');
this.extensionConfig.installDependencies = true;
}
// Write Command Extension (JavaScript)
_writingCommandJs() {
let context = this.extensionConfig;
this.fs.copy(this.sourceRoot() + '/vscode', context.name + '/.vscode');
this.fs.copy(this.sourceRoot() + '/test', context.name + '/test');
this.fs.copy(this.sourceRoot() + '/vscodeignore', context.name + '/.vscodeignore');
if (this.extensionConfig.gitInit) {
this.fs.copy(this.sourceRoot() + '/gitignore', context.name + '/.gitignore');
}
this.fs.copyTpl(this.sourceRoot() + '/README.md', context.name + '/README.md', context);
this.fs.copyTpl(this.sourceRoot() + '/CHANGELOG.md', context.name + '/CHANGELOG.md', context);
this.fs.copyTpl(this.sourceRoot() + '/vsc-extension-quickstart.md', context.name + '/vsc-extension-quickstart.md', context);
this.fs.copyTpl(this.sourceRoot() + '/jsconfig.json', context.name + '/jsconfig.json', context);
this.fs.copyTpl(this.sourceRoot() + '/extension.js', context.name + '/extension.js', context);
this.fs.copyTpl(this.sourceRoot() + '/package.json', context.name + '/package.json', context);
this.fs.copyTpl(this.sourceRoot() + '/.eslintrc.json', context.name + '/.eslintrc.json', context);
this.extensionConfig.installDependencies = true;
}
// Installation
install() {
process.chdir(this.extensionConfig.name);
if (this.extensionConfig.installDependencies) {
this.installDependencies({
yarn: this.extensionConfig.pkgManager === 'yarn',
npm: this.extensionConfig.pkgManager === 'npm',
bower: false
});
}
}
// End
end() {
// Git init
if (this.extensionConfig.gitInit) {
this.spawnCommand('git', ['init', '--quiet']);
}
this.log('');
this.log('Your extension ' + this.extensionConfig.name + ' has been created!');
this.log('');
this.log('To start editing with Visual Studio Code, use the following commands:');
this.log('');
this.log(' cd ' + this.extensionConfig.name);
this.log(' code .');
this.log('');
this.log('Open vsc-extension-quickstart.md inside the new extension for further instructions');
this.log('on how to modify, test and publish your extension.');
this.log('');
if (this.extensionConfig.type === 'ext-extensionpack') {
this.log(chalk.default.yellow('Please review the "extensionPack" in the "package.json" before publishing the extension pack.'));
this.log('');
}
this.log('For more information, also visit http://code.visualstudio.com and follow us @code.');
this.log('\r\n');
}
}
@@ -0,0 +1,77 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
'use strict';
exports.askForLanguageId = (generator) => {
if (generator.extensionConfig.type !== 'ext-localization') {
return Promise.resolve();
}
generator.extensionConfig.isCustomization = true;
generator.log("Enter the language identifier as used on transifex (e.g. bg, zh-Hant).");
return generator.prompt({
type: 'input',
name: 'lpLanguageId',
message: 'Language id:',
}).then(answer => {
generator.extensionConfig.lpLanguageId = answer.lpLanguageId;
if (!generator.options['extensionName']) {
generator.options['extensionName'] = "vscode-language-pack-" + answer.lpLanguageId;
}
return Promise.resolve();
});
}
exports.askForLanguageName = (generator) => {
if (generator.extensionConfig.type !== 'ext-localization') {
return Promise.resolve();
}
generator.extensionConfig.isCustomization = true;
generator.log("Enter the language name in English (e.g. 'Bulgarian', 'Dutch').");
return generator.prompt({
type: 'input',
name: 'lpLanguageName',
message: 'Language name:',
}).then(answer => {
generator.extensionConfig.lpLanguageName = answer.lpLanguageName;
if (!generator.options['extensionDisplayName']) {
generator.options['extensionDisplayName'] = answer.lpLanguageName + " Language Pack";
}
if (!generator.options['extensionDescription']) {
generator.options['extensionDescription'] = "Language pack extension for " + answer.lpLanguageName;
}
return Promise.resolve();
});
}
exports.askForLocalizedLanguageName = (generator) => {
if (generator.extensionConfig.type !== 'ext-localization') {
return Promise.resolve();
}
generator.extensionConfig.isCustomization = true;
generator.log("Enter the language name in " + generator.extensionConfig.lpLanguageName);
return generator.prompt({
type: 'input',
name: 'lpLocalizedLanguageName',
message: 'Localized language name:',
}).then(answer => {
generator.extensionConfig.lpLocalizedLanguageName = answer.lpLocalizedLanguageName;
return Promise.resolve();
});
}
exports.writingLocalizationExtension = (generator) => {
var context = generator.extensionConfig;
generator.fs.copyTpl(generator.sourceRoot() + '/package.json', context.name + '/package.json', context);
generator.fs.copyTpl(generator.sourceRoot() + '/vsc-extension-quickstart.md', context.name + '/vsc-extension-quickstart.md', context);
generator.fs.copyTpl(generator.sourceRoot() + '/README.md', context.name + '/README.md', context);
generator.fs.copyTpl(generator.sourceRoot() + '/CHANGELOG.md', context.name + '/CHANGELOG.md', context);
generator.fs.copy(generator.sourceRoot() + '/vscodeignore', context.name + '/.vscodeignore');
generator.fs.copy(generator.sourceRoot() + '/gitignore', context.name + '/.gitignore');
generator.fs.copy(generator.sourceRoot() + '/gitattributes', context.name + '/.gitattributes');
context.installDependencies = true;
}
@@ -0,0 +1,156 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
'use strict';
var path = require('path');
var fs = require('fs');
var plistParser = require('fast-plist');
function processSnippetFolder(folderPath, generator) {
var errors = [], snippets = {};
var snippetCount = 0;
var languageId = null;
var count = convert(folderPath);
if (count <= 0) {
generator.log("No valid snippets found in " + folderPath + (errors.length > 0 ? '.\n' + errors.join('\n'): ''));
return count;
}
generator.extensionConfig.snippets = snippets;
generator.extensionConfig.languageId = languageId;
generator.log(count + " snippet(s) found and converted." + (errors.length > 0 ? '\n\nProblems while converting: \n' + errors.join('\n'): ''));
return count;
function convert(folderPath) {
var files = getFolderContent(folderPath, errors);
if (errors.length > 0) {
return -1;
}
files.forEach(function (fileName) {
var extension = path.extname(fileName).toLowerCase();
var snippet;
if (extension === '.tmsnippet') {
snippet = convertTextMate(path.join(folderPath, fileName));
} else if (extension === '.sublime-snippet') {
snippet = convertSublime(path.join(folderPath, fileName));
}
if (snippet) {
if (snippet.prefix && snippet.body) {
snippets[getId(snippet.prefix)] = snippet;
snippetCount++;
guessLanguage(snippet.scope);
} else {
var filePath = path.join(folderPath, fileName);
if (!snippet.prefix) {
errors.push(filePath + ": Missing property 'tabTrigger'. Snippet skipped.");
} else {
errors.push(filePath + ": Missing property 'content'. Snippet skipped.");
}
}
}
});
return snippetCount;
}
function getId(prefix) {
if (snippets.hasOwnProperty(prefix)) {
var counter = 1;
while (snippets.hasOwnProperty(prefix + counter)) {
counter++;
}
return prefix + counter;
}
return prefix;
}
function guessLanguage(scopeName) {
if (!languageId && scopeName) {
var match;
if (match = /(source|text)\.(\w+)/.exec(scopeName)) {
languageId = match[2];
}
}
}
function convertTextMate(filePath) {
var body = getFileContent(filePath, errors);
if (!body) {
return;
}
var value;
try {
value = plistParser.parse(body);
} catch (e) {
generator.log(filePath + " not be parsed: " + e.toString());
return undefined;
}
if (!value) {
generator.log(filePath + " not be parsed. Make sure it is a valid plist file. ");
return undefined;
}
return {
prefix: value.tabTrigger,
body: value.content,
description: value.name,
scope: value.scope
}
}
function convertSublime(filePath) {
var body = getFileContent(filePath, errors);
if (!body) {
return;
}
var parsed = plistParser.parse(body);
var snippet = {
prefix: parsed['tabtrigger'],
body: parsed['content'],
description: parsed['description'],
scope: parsed['scope']
};
return snippet;
}
}
function getFolderContent(folderPath, errors) {
try {
return fs.readdirSync(folderPath);
} catch (e) {
errors.push("Unable to access " + folderPath + ": " + e.message);
return [];
}
}
function getFileContent(filePath, errors) {
try {
var content = fs.readFileSync(filePath).toString();
if (content === '') {
errors.push(filePath + ": Empty file content");
}
return content;
} catch (e) {
errors.push(filePath + ": Problems loading file content: " + e.message);
return null;
}
}
function isFile(filePath) {
try {
return fs.statSync(filePath).isFile()
} catch (e) {
return false;
}
}
exports.processSnippetFolder = processSnippetFolder;
@@ -0,0 +1,9 @@
# Change Log
All notable changes to the "<%= name %>" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release
@@ -0,0 +1,13 @@
# README
## This is the README for your extension "<%= name %>"
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
### For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
@@ -0,0 +1,3 @@
# Set default behavior to automatically normalize line endings.
* text=auto
@@ -0,0 +1,2 @@
node_modules
*.vsix
@@ -0,0 +1,21 @@
{
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
"categories": [
"Themes"
],
"contributes": {
"themes": [
{
"label": <%- JSON.stringify(themeName) %>,
"uiTheme": <%- JSON.stringify(themeBase) %>,
"path": <%- JSON.stringify("./themes/" + themeFileName) %>
}
]
}
}
@@ -0,0 +1 @@
<%-JSON.stringify(themeContent, null, '\t')%>
@@ -0,0 +1,629 @@
{
"name": <%-JSON.stringify(themeName)%>,
"type": "dark",
"colors": {
"editor.background": "#263238",
"editor.foreground": "#eeffff",
"activityBarBadge.background": "#007acc",
"sideBarTitle.foreground": "#bbbbbb"
},
"tokenColors": [
{
"name": "Comment",
"scope": [
"comment",
"punctuation.definition.comment"
],
"settings": {
"fontStyle": "italic",
"foreground": "#546E7A"
}
},
{
"name": "Variables",
"scope": [
"variable",
"string constant.other.placeholder"
],
"settings": {
"foreground": "#EEFFFF"
}
},
{
"name": "Colors",
"scope": [
"constant.other.color"
],
"settings": {
"foreground": "#ffffff"
}
},
{
"name": "Invalid",
"scope": [
"invalid",
"invalid.illegal"
],
"settings": {
"foreground": "#FF5370"
}
},
{
"name": "Keyword, Storage",
"scope": [
"keyword",
"storage.type",
"storage.modifier"
],
"settings": {
"foreground": "#C792EA"
}
},
{
"name": "Operator, Misc",
"scope": [
"keyword.control",
"constant.other.color",
"punctuation",
"meta.tag",
"punctuation.definition.tag",
"punctuation.separator.inheritance.php",
"punctuation.definition.tag.html",
"punctuation.definition.tag.begin.html",
"punctuation.definition.tag.end.html",
"punctuation.section.embedded",
"keyword.other.template",
"keyword.other.substitution"
],
"settings": {
"foreground": "#89DDFF"
}
},
{
"name": "Tag",
"scope": [
"entity.name.tag",
"meta.tag.sgml",
"markup.deleted.git_gutter"
],
"settings": {
"foreground": "#f07178"
}
},
{
"name": "Function, Special Method",
"scope": [
"entity.name.function",
"meta.function-call",
"variable.function",
"support.function",
"keyword.other.special-method"
],
"settings": {
"foreground": "#82AAFF"
}
},
{
"name": "Block Level Variables",
"scope": [
"meta.block variable.other"
],
"settings": {
"foreground": "#f07178"
}
},
{
"name": "Other Variable, String Link",
"scope": [
"support.other.variable",
"string.other.link"
],
"settings": {
"foreground": "#f07178"
}
},
{
"name": "Number, Constant, Function Argument, Tag Attribute, Embedded",
"scope": [
"constant.numeric",
"constant.language",
"support.constant",
"constant.character",
"constant.escape",
"variable.parameter",
"keyword.other.unit",
"keyword.other"
],
"settings": {
"foreground": "#F78C6C"
}
},
{
"name": "String, Symbols, Inherited Class, Markup Heading",
"scope": [
"string",
"constant.other.symbol",
"constant.other.key",
"entity.other.inherited-class",
"markup.heading",
"markup.inserted.git_gutter",
"meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js"
],
"settings": {
"foreground": "#C3E88D"
}
},
{
"name": "Class, Support",
"scope": [
"entity.name",
"support.type",
"support.class",
"support.orther.namespace.use.php",
"meta.use.php",
"support.other.namespace.php",
"markup.changed.git_gutter",
"support.type.sys-types"
],
"settings": {
"foreground": "#FFCB6B"
}
},
{
"name": "Entity Types",
"scope": [
"support.type"
],
"settings": {
"foreground": "#B2CCD6"
}
},
{
"name": "CSS Class and Support",
"scope": [
"source.css support.type.property-name",
"source.sass support.type.property-name",
"source.scss support.type.property-name",
"source.less support.type.property-name",
"source.stylus support.type.property-name",
"source.postcss support.type.property-name"
],
"settings": {
"foreground": "#B2CCD6"
}
},
{
"name": "Sub-methods",
"scope": [
"entity.name.module.js",
"variable.import.parameter.js",
"variable.other.class.js"
],
"settings": {
"foreground": "#FF5370"
}
},
{
"name": "Language methods",
"scope": [
"variable.language"
],
"settings": {
"fontStyle": "italic",
"foreground": "#FF5370"
}
},
{
"name": "entity.name.method.js",
"scope": [
"entity.name.method.js"
],
"settings": {
"fontStyle": "italic",
"foreground": "#82AAFF"
}
},
{
"name": "meta.method.js",
"scope": [
"meta.class-method.js entity.name.function.js",
"variable.function.constructor"
],
"settings": {
"foreground": "#82AAFF"
}
},
{
"name": "Attributes",
"scope": [
"entity.other.attribute-name"
],
"settings": {
"foreground": "#C792EA"
}
},
{
"name": "HTML Attributes",
"scope": [
"text.html.basic entity.other.attribute-name.html",
"text.html.basic entity.other.attribute-name"
],
"settings": {
"fontStyle": "italic",
"foreground": "#FFCB6B"
}
},
{
"name": "CSS Classes",
"scope": [
"entity.other.attribute-name.class"
],
"settings": {
"foreground": "#FFCB6B"
}
},
{
"name": "CSS ID's",
"scope": [
"source.sass keyword.control"
],
"settings": {
"foreground": "#82AAFF"
}
},
{
"name": "Inserted",
"scope": [
"markup.inserted"
],
"settings": {
"foreground": "#C3E88D"
}
},
{
"name": "Deleted",
"scope": [
"markup.deleted"
],
"settings": {
"foreground": "#FF5370"
}
},
{
"name": "Changed",
"scope": [
"markup.changed"
],
"settings": {
"foreground": "#C792EA"
}
},
{
"name": "Regular Expressions",
"scope": [
"string.regexp"
],
"settings": {
"foreground": "#89DDFF"
}
},
{
"name": "Escape Characters",
"scope": [
"constant.character.escape"
],
"settings": {
"foreground": "#89DDFF"
}
},
{
"name": "URL",
"scope": [
"*url*",
"*link*",
"*uri*"
],
"settings": {
"fontStyle": "underline"
}
},
{
"name": "Decorators",
"scope": [
"tag.decorator.js entity.name.tag.js",
"tag.decorator.js punctuation.definition.tag.js"
],
"settings": {
"fontStyle": "italic",
"foreground": "#82AAFF"
}
},
{
"name": "ES7 Bind Operator",
"scope": [
"source.js constant.other.object.key.js string.unquoted.label.js"
],
"settings": {
"fontStyle": "italic",
"foreground": "#FF5370"
}
},
{
"name": "JSON Key - Level 0",
"scope": [
"source.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#C792EA"
}
},
{
"name": "JSON Key - Level 1",
"scope": [
"source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#FFCB6B"
}
},
{
"name": "JSON Key - Level 2",
"scope": [
"source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#F78C6C"
}
},
{
"name": "JSON Key - Level 3",
"scope": [
"source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#FF5370"
}
},
{
"name": "JSON Key - Level 4",
"scope": [
"source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#C17E70"
}
},
{
"name": "JSON Key - Level 5",
"scope": [
"source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#82AAFF"
}
},
{
"name": "JSON Key - Level 6",
"scope": [
"source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#f07178"
}
},
{
"name": "JSON Key - Level 7",
"scope": [
"source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#C792EA"
}
},
{
"name": "JSON Key - Level 8",
"scope": [
"source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
],
"settings": {
"foreground": "#C3E88D"
}
},
{
"name": "Markdown - Plain",
"scope": [
"text.html.markdown",
"punctuation.definition.list_item.markdown"
],
"settings": {
"foreground": "#EEFFFF"
}
},
{
"name": "Markdown - Markup Raw Inline",
"scope": [
"text.html.markdown markup.inline.raw.markdown"
],
"settings": {
"foreground": "#C792EA"
}
},
{
"name": "Markdown - Markup Raw Inline Punctuation",
"scope": [
"text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown"
],
"settings": {
"foreground": "#65737E"
}
},
{
"name": "Markdown - Heading",
"scope": [
"markdown.heading",
"markup.heading | markup.heading entity.name",
"markup.heading.markdown punctuation.definition.heading.markdown"
],
"settings": {
"foreground": "#C3E88D"
}
},
{
"name": "Markup - Italic",
"scope": [
"markup.italic"
],
"settings": {
"fontStyle": "italic",
"foreground": "#f07178"
}
},
{
"name": "Markup - Bold",
"scope": [
"markup.bold",
"markup.bold string"
],
"settings": {
"fontStyle": "bold",
"foreground": "#f07178"
}
},
{
"name": "Markup - Bold-Italic",
"scope": [
"markup.bold markup.italic",
"markup.italic markup.bold",
"markup.quote markup.bold",
"markup.bold markup.italic string",
"markup.italic markup.bold string",
"markup.quote markup.bold string"
],
"settings": {
"fontStyle": "bold",
"foreground": "#f07178"
}
},
{
"name": "Markup - Underline",
"scope": [
"markup.underline"
],
"settings": {
"fontStyle": "underline",
"foreground": "#F78C6C"
}
},
{
"name": "Markdown - Blockquote",
"scope": [
"markup.quote punctuation.definition.blockquote.markdown"
],
"settings": {
"foreground": "#65737E"
}
},
{
"name": "Markup - Quote",
"scope": [
"markup.quote"
],
"settings": {
"fontStyle": "italic",
}
},
{
"name": "Markdown - Link",
"scope": [
"string.other.link.title.markdown"
],
"settings": {
"foreground": "#82AAFF"
}
},
{
"name": "Markdown - Link Description",
"scope": [
"string.other.link.description.title.markdown"
],
"settings": {
"foreground": "#C792EA"
}
},
{
"name": "Markdown - Link Anchor",
"scope": [
"constant.other.reference.link.markdown"
],
"settings": {
"foreground": "#FFCB6B"
}
},
{
"name": "Markup - Raw Block",
"scope": [
"markup.raw.block"
],
"settings": {
"foreground": "#C792EA"
}
},
{
"name": "Markdown - Raw Block Fenced",
"scope": [
"markup.raw.block.fenced.markdown"
],
"settings": {
"foreground": "#00000050"
}
},
{
"name": "Markdown - Fenced Bode Block",
"scope": [
"punctuation.definition.fenced.markdown"
],
"settings": {
"foreground": "#00000050"
}
},
{
"name": "Markdown - Fenced Bode Block Variable",
"scope": [
"markup.raw.block.fenced.markdown",
"variable.language.fenced.markdown",
"punctuation.section.class.end"
],
"settings": {
"foreground": "#EEFFFF"
}
},
{
"name": "Markdown - Fenced Language",
"scope": [
"variable.language.fenced.markdown"
],
"settings": {
"foreground": "#65737E"
}
},
{
"name": "Markdown - Separator",
"scope": [
"meta.separator"
],
"settings": {
"fontStyle": "bold",
"foreground": "#65737E"
}
},
{
"name": "Markup - Table",
"scope": [
"markup.table"
],
"settings": {
"foreground": "#EEFFFF"
}
}
]
}
@@ -0,0 +1,386 @@
{
"name": <%-JSON.stringify(themeName)%>,
"type": "hc",
"colors": {
"editor.background": "#000000",
"editor.foreground": "#ffffff"
},
"tokenColors": [
{
"scope": "emphasis",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "strong",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "meta.diff.header",
"settings": {
"foreground": "#000080"
}
},
{
"scope": "comment",
"settings": {
"foreground": "#7ca668"
}
},
{
"scope": "constant.language",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": [
"constant.numeric",
"constant.other.color.rgb-value",
"constant.other.rgb-value",
"support.constant.color"
],
"settings": {
"foreground": "#b5cea8"
}
},
{
"scope": "constant.regexp",
"settings": {
"foreground": "#b46695"
}
},
{
"scope": "entity.name.tag",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "entity.name.tag.css",
"settings": {
"foreground": "#d7ba7d"
}
},
{
"scope": "entity.other.attribute-name",
"settings": {
"foreground": "#9cdcfe"
}
},
{
"scope": [
"source.css entity.other.attribute-name",
"source.css.less entity.other.attribute-name.id",
"source.scss entity.other.attribute-name"
],
"settings": {
"foreground": "#d7ba7d"
}
},
{
"scope": "invalid",
"settings": {
"foreground": "#f44747"
}
},
{
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "markup.bold",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "markup.heading",
"settings": {
"foreground": "#6796e6"
}
},
{
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "markup.inserted",
"settings": {
"foreground": "#b5cea8"
}
},
{
"scope": "markup.deleted",
"settings": {
"foreground": "#ce9178"
}
},
{
"scope": "markup.changed",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "meta.selector",
"settings": {
"foreground": "#d7ba7d"
}
},
{
"name": "brackets of XML/HTML tags",
"scope": [
"punctuation.definition.tag"
],
"settings": {
"foreground": "#808080"
}
},
{
"scope": "meta.preprocessor",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "meta.preprocessor.string",
"settings": {
"foreground": "#ce9178"
}
},
{
"scope": "meta.preprocessor.numeric",
"settings": {
"foreground": "#b5cea8"
}
},
{
"scope": "meta.structure.dictionary.key.python",
"settings": {
"foreground": "#9cdcfe"
}
},
{
"scope": "storage",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "storage.type",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "storage.modifier",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "string",
"settings": {
"foreground": "#ce9178"
}
},
{
"scope": "string.tag",
"settings": {
"foreground": "#ce9178"
}
},
{
"scope": "string.value",
"settings": {
"foreground": "#ce9178"
}
},
{
"scope": "string.regexp",
"settings": {
"foreground": "#d16969"
}
},
{
"name": "JavaScript string interpolation ${}",
"scope": [
"punctuation.definition.template-expression.begin.js",
"punctuation.definition.template-expression.begin.ts",
"punctuation.definition.template-expression.end.ts",
"punctuation.definition.template-expression.end.js"
],
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": [
"support.type.vendored.property-name",
"support.type.property-name",
"variable.css",
"variable.scss",
"variable.other.less"
],
"settings": {
"foreground": "#d4d4d4"
}
},
{
"scope": "keyword",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "keyword.control",
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "keyword.operator",
"settings": {
"foreground": "#d4d4d4"
}
},
{
"scope": [
"keyword.operator.new",
"keyword.operator.expression",
"keyword.operator.cast",
"keyword.operator.sizeof",
"keyword.operator.logical.python"
],
"settings": {
"foreground": "#569cd6"
}
},
{
"scope": "keyword.other.unit",
"settings": {
"foreground": "#b5cea8"
}
},
{
"scope": "support.function.git-rebase",
"settings": {
"foreground": "#d4d4d4"
}
},
{
"scope": "constant.sha.git-rebase",
"settings": {
"foreground": "#b5cea8"
}
},
{
"name": "coloring of the Java import and package identifiers",
"scope": [
"storage.modifier.import.java",
"variable.language.wildcard.java",
"storage.modifier.package.java"
],
"settings": {
"foreground": "#d4d4d4"
}
},
{
"name": "coloring of the TS this",
"scope": "variable.language.this",
"settings": {
"foreground": "#569cd6"
}
},
{
"name": "Function declarations",
"scope": [
"entity.name.function",
"support.function",
"support.constant.handlebars"
],
"settings": {
"foreground": "#DCDCAA"
}
},
{
"name": "Types declaration and references",
"scope": [
"meta.return-type",
"support.class",
"support.type",
"entity.name.type",
"entity.name.class",
"source.cs storage.type"
],
"settings": {
"foreground": "#4EC9B0"
}
},
{
"name": "Types declaration and references, TS grammar specific",
"scope": [
"meta.type.cast.expr",
"meta.type.new.expr",
"support.constant.math",
"support.constant.dom",
"support.constant.json",
"entity.other.inherited-class"
],
"settings": {
"foreground": "#4EC9B0"
}
},
{
"name": "Control flow keywords",
"scope": "keyword.control",
"settings": {
"foreground": "#C586C0"
}
},
{
"name": "Variable and parameter name",
"scope": [
"variable",
"meta.definition.variable.name",
"support.variable"
],
"settings": {
"foreground": "#9CDCFE"
}
},
{
"name": "Object keys, TS grammar specific",
"scope": [
"meta.object-literal.key",
"meta.object-literal.key entity.name.function"
],
"settings": {
"foreground": "#9CDCFE"
}
},
{
"name": "CSS property value",
"scope": [
"support.constant.property-value",
"support.constant.font-name",
"support.constant.media-type",
"support.constant.media",
"constant.other.color.rgb-value",
"constant.other.rgb-value",
"support.constant.color"
],
"settings": {
"foreground": "#CE9178"
}
}
]
}
@@ -0,0 +1,413 @@
{
"name": <%-JSON.stringify(themeName)%>,
"type": "light",
"colors": {
"editor.background": "#f5f5f5",
"editor.foreground": "#333333"
},
"tokenColors": [
{
"name": "Comments",
"scope": [
"comment",
"punctuation.definition.comment"
],
"settings": {
"fontStyle": "italic",
"foreground": "#AAAAAA"
}
},
{
"name": "Comments: Preprocessor",
"scope": "comment.block.preprocessor",
"settings": {
"fontStyle": "",
"foreground": "#AAAAAA"
}
},
{
"name": "Comments: Documentation",
"scope": [
"comment.documentation",
"comment.block.documentation"
],
"settings": {
"foreground": "#448C27"
}
},
{
"name": "Invalid - Illegal",
"scope": "invalid.illegal",
"settings": {
"foreground": "#660000"
}
},
{
"name": "Operators",
"scope": "keyword.operator",
"settings": {
"foreground": "#777777"
}
},
{
"name": "Keywords",
"scope": [
"keyword",
"storage"
],
"settings": {
"foreground": "#4B83CD"
}
},
{
"name": "Types",
"scope": [
"storage.type",
"support.type"
],
"settings": {
"foreground": "#7A3E9D"
}
},
{
"name": "Language Constants",
"scope": [
"constant.language",
"support.constant",
"variable.language"
],
"settings": {
"foreground": "#AB6526"
}
},
{
"name": "Variables",
"scope": [
"variable",
"support.variable"
],
"settings": {
"foreground": "#7A3E9D"
}
},
{
"name": "Functions",
"scope": [
"entity.name.function",
"support.function"
],
"settings": {
"fontStyle": "bold",
"foreground": "#AA3731"
}
},
{
"name": "Classes",
"scope": [
"entity.name.type",
"entity.other.inherited-class",
"support.class"
],
"settings": {
"fontStyle": "bold",
"foreground": "#7A3E9D"
}
},
{
"name": "Exceptions",
"scope": "entity.name.exception",
"settings": {
"foreground": "#660000"
}
},
{
"name": "Sections",
"scope": "entity.name.section",
"settings": {
"fontStyle": "bold"
}
},
{
"name": "Numbers, Characters",
"scope": [
"constant.numeric",
"constant.character",
"constant"
],
"settings": {
"foreground": "#AB6526"
}
},
{
"name": "Strings",
"scope": "string",
"settings": {
"foreground": "#448C27"
}
},
{
"name": "Strings: Escape Sequences",
"scope": "constant.character.escape",
"settings": {
"foreground": "#777777"
}
},
{
"name": "Strings: Regular Expressions",
"scope": "string.regexp",
"settings": {
"foreground": "#4B83CD"
}
},
{
"name": "Strings: Symbols",
"scope": "constant.other.symbol",
"settings": {
"foreground": "#AB6526"
}
},
{
"name": "Punctuation",
"scope": "punctuation",
"settings": {
"foreground": "#777777"
}
},
{
"name": "HTML: Doctype Declaration",
"scope": [
"meta.tag.sgml.doctype",
"meta.tag.sgml.doctype string",
"meta.tag.sgml.doctype entity.name.tag",
"meta.tag.sgml punctuation.definition.tag.html"
],
"settings": {
"foreground": "#AAAAAA"
}
},
{
"name": "HTML: Tags",
"scope": [
"meta.tag",
"punctuation.definition.tag.html",
"punctuation.definition.tag.begin.html",
"punctuation.definition.tag.end.html"
],
"settings": {
"foreground": "#91B3E0"
}
},
{
"name": "HTML: Tag Names",
"scope": "entity.name.tag",
"settings": {
"foreground": "#4B83CD"
}
},
{
"name": "HTML: Attribute Names",
"scope": [
"meta.tag entity.other.attribute-name",
"entity.other.attribute-name.html"
],
"settings": {
"fontStyle": "italic",
"foreground": "#91B3E0"
}
},
{
"name": "HTML: Entities",
"scope": [
"constant.character.entity",
"punctuation.definition.entity"
],
"settings": {
"foreground": "#AB6526"
}
},
{
"name": "CSS: Selectors",
"scope": [
"meta.selector",
"meta.selector entity",
"meta.selector entity punctuation",
"entity.name.tag.css"
],
"settings": {
"foreground": "#7A3E9D"
}
},
{
"name": "CSS: Property Names",
"scope": [
"meta.property-name",
"support.type.property-name"
],
"settings": {
"foreground": "#AB6526"
}
},
{
"name": "CSS: Property Values",
"scope": [
"meta.property-value",
"meta.property-value constant.other",
"support.constant.property-value"
],
"settings": {
"foreground": "#448C27"
}
},
{
"name": "CSS: Important Keyword",
"scope": "keyword.other.important",
"settings": {
"fontStyle": "bold"
}
},
{
"name": "Markup: Changed",
"scope": "markup.changed",
"settings": {
"foreground": "#000000"
}
},
{
"name": "Markup: Deletion",
"scope": "markup.deleted",
"settings": {
"foreground": "#000000"
}
},
{
"name": "Markup: Emphasis",
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
},
{
"name": "Markup: Error",
"scope": "markup.error",
"settings": {
"foreground": "#660000"
}
},
{
"name": "Markup: Insertion",
"scope": "markup.inserted",
"settings": {
"foreground": "#000000"
}
},
{
"name": "Markup: Link",
"scope": "meta.link",
"settings": {
"foreground": "#4B83CD"
}
},
{
"name": "Markup: Output",
"scope": [
"markup.output",
"markup.raw"
],
"settings": {
"foreground": "#777777"
}
},
{
"name": "Markup: Prompt",
"scope": "markup.prompt",
"settings": {
"foreground": "#777777"
}
},
{
"name": "Markup: Heading",
"scope": "markup.heading",
"settings": {
"foreground": "#AA3731"
}
},
{
"name": "Markup: Strong",
"scope": "markup.bold",
"settings": {
"fontStyle": "bold"
}
},
{
"name": "Markup: Traceback",
"scope": "markup.traceback",
"settings": {
"foreground": "#660000"
}
},
{
"name": "Markup: Underline",
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"name": "Markup Quote",
"scope": "markup.quote",
"settings": {
"foreground": "#7A3E9D"
}
},
{
"name": "Markup Lists",
"scope": "markup.list",
"settings": {
"foreground": "#4B83CD"
}
},
{
"name": "Markup Styling",
"scope": [
"markup.bold",
"markup.italic"
],
"settings": {
"foreground": "#448C27"
}
},
{
"name": "Markup Inline",
"scope": "markup.inline.raw",
"settings": {
"fontStyle": "",
"foreground": "#AB6526"
}
},
{
"name": "Extra: Diff Range",
"scope": [
"meta.diff.range",
"meta.diff.index",
"meta.separator"
],
"settings": {
"foreground": "#434343"
}
},
{
"name": "Extra: Diff From",
"scope": "meta.diff.header.from-file",
"settings": {
"foreground": "#434343"
}
},
{
"name": "Extra: Diff To",
"scope": "meta.diff.header.to-file",
"settings": {
"foreground": "#434343"
}
}
]
}
@@ -0,0 +1 @@
<%- tmThemeContent %>
@@ -0,0 +1,28 @@
# Welcome to your VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your color theme extension.
* `package.json` - this is the manifest file that defines the location of the theme file and specifies the base theme of the theme.
* `themes/<%= themeFileName %>` - the color theme definition file.
## Get up and running straight away
* Press `F5` to open a new window with your extension loaded.
* Open `File > Preferences > Color Themes` and pick your color theme.
* Open a file that has a language associated. The languages' configured grammar will tokenize the text and assign 'scopes' to the tokens. To examine these scopes, invoke the `Inspect TM Scopes` command from the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) .
## Make changes
* Changes to the theme file are automatically applied to the Extension Development Host window.
## Adopt your theme to Visual Studio Code
* The token colorization is done based on standard TextMate themes. Colors are matched against one or more scopes.
To learn more about scopes and how they're used, check out the [color theme](https://code.visualstudio.com/api/extension-guides/color-theme) documentation.
## Install your extension
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
@@ -0,0 +1,18 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
@@ -0,0 +1,23 @@
{
"env": {
"browser": false,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
}
}
@@ -0,0 +1,9 @@
# Change Log
All notable changes to the "<%= name %>" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release
@@ -0,0 +1,65 @@
# <%= name %> README
This is the README for your extension "<%= name %>". After writing up a brief description, we recommend including the following sections.
## Features
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
For example if there is an image subfolder under your extension project workspace:
\!\[feature X\]\(images/feature-x.png\)
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
## Requirements
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
For example:
This extension contributes the following settings:
* `myExtension.enable`: enable/disable this extension
* `myExtension.thing`: set to `blah` to do something
## Known Issues
Calling out known issues can help limit users opening duplicate issues against your extension.
## Release Notes
Users appreciate release notes as you update your extension.
### 1.0.0
Initial release of ...
### 1.0.1
Fixed issue #.
### 1.1.0
Added features X, Y, and Z.
-----------------------------------------------------------------------------------------------------------
## Working with Markdown
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
### For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
@@ -0,0 +1,37 @@
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
const vscode = require('vscode');
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
/**
* @param {vscode.ExtensionContext} context
*/
function activate(context) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "<%= name %>" is now active!');
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
let disposable = vscode.commands.registerCommand('extension.helloWorld', function () {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
vscode.window.showInformationMessage('Hello World!');
});
context.subscriptions.push(disposable);
}
exports.activate = activate;
// this method is called when your extension is deactivated
function deactivate() {}
module.exports = {
activate,
deactivate
}
@@ -0,0 +1,3 @@
node_modules
.vscode-test/
*.vsix
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"checkJs": <%- JSON.stringify(checkJavaScript) %>, /* Typecheck .js files. */
"lib": [
"es6"
]
},
"exclude": [
"node_modules"
]
}
@@ -0,0 +1,36 @@
{
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:extension.helloWorld"
],
"main": "./extension.js",
"contributes": {
"commands": [{
"command": "extension.helloWorld",
"title": "Hello World"
}]
},
"scripts": {
"test": "node ./test/runTest.js"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/mocha": "^5.2.6",
"@types/node": "^10.12.21",
"@types/vscode": <%- JSON.stringify(vsCodeEngine) %>,
"eslint": "^5.13.0",
"glob": "^7.1.4",
"mocha": "^6.1.4",
"typescript": "^3.3.1",
"vscode-test": "^1.2.0"
}
}
@@ -0,0 +1,23 @@
const path = require('path');
const { runTests } = require('vscode-test');
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../');
// The path to the extension test script
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
main();
@@ -0,0 +1,18 @@
const assert = require('assert');
const { before } = require('mocha');
// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
const vscode = require('vscode');
// const myExtension = require('../extension');
suite('Extension Test Suite', () => {
before(() => {
vscode.window.showInformationMessage('Start all tests.');
});
test('Sample test', () => {
assert.equal(-1, [1, 2, 3].indexOf(5));
assert.equal(-1, [1, 2, 3].indexOf(0));
});
});
@@ -0,0 +1,42 @@
const path = require('path');
const Mocha = require('mocha');
const glob = require('glob');
function run() {
// Create the mocha test
const mocha = new Mocha({
ui: 'tdd'
});
// Use any mocha API
mocha.useColors(true);
const testsRoot = path.resolve(__dirname, '..');
return new Promise((c, e) => {
glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
if (err) {
return e(err);
}
// Add files to the test suite
files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
try {
// Run the mocha test
mocha.run(failures => {
if (failures > 0) {
e(new Error(`${failures} tests failed.`));
} else {
c();
}
});
} catch (err) {
e(err);
}
});
});
}
module.exports = {
run
};
@@ -0,0 +1,39 @@
# Welcome to your VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your extension.
* `package.json` - this is the manifest file in which you declare your extension and command.
* The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesnt yet need to load the plugin.
* `extension.js` - this is the main file where you will provide the implementation of your command.
* The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
* We pass the function containing the implementation of the command as the second parameter to `registerCommand`.
## Get up and running straight away
* Press `F5` to open a new window with your extension loaded.
* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
* Set breakpoints in your code inside `extension.js` to debug your extension.
* Find output from your extension in the debug console.
## Make changes
* You can relaunch the extension from the debug toolbar after changing code in `extension.js`.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
## Explore the API
* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
## Run tests
* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`.
* Press `F5` to run the tests in a new window with your extension loaded.
* See the output of the test result in the debug console.
* Make changes to `src/test/suite/extension.test.js` or create new test files inside the `test/suite` folder.
* The provided test runner will only consider files matching the name pattern `**.test.ts`.
* You can create folders inside the `test` folder to structure your tests any way you want.
## Go further
* [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace.
* Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
@@ -0,0 +1,7 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
@@ -0,0 +1,28 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
]
}
]
}
@@ -0,0 +1,8 @@
.vscode/**
.vscode-test/**
test/**
.gitignore
vsc-extension-quickstart.md
**/jsconfig.json
**/*.map
**/.eslintrc.json
@@ -0,0 +1,9 @@
# Change Log
All notable changes to the "<%= name %>" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release
@@ -0,0 +1,65 @@
# <%= name %> README
This is the README for your extension "<%= name %>". After writing up a brief description, we recommend including the following sections.
## Features
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
For example if there is an image subfolder under your extension project workspace:
\!\[feature X\]\(images/feature-x.png\)
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
## Requirements
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
For example:
This extension contributes the following settings:
* `myExtension.enable`: enable/disable this extension
* `myExtension.thing`: set to `blah` to do something
## Known Issues
Calling out known issues can help limit users opening duplicate issues against your extension.
## Release Notes
Users appreciate release notes as you update your extension.
### 1.0.0
Initial release of ...
### 1.0.1
Fixed issue #.
### 1.1.0
Added features X, Y, and Z.
-----------------------------------------------------------------------------------------------------------
## Working with Markdown
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
### For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
@@ -0,0 +1,4 @@
out
node_modules
.vscode-test/
*.vsix
@@ -0,0 +1,40 @@
{
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:extension.helloWorld"
],
"main": "./out/extension.js",
"contributes": {
"commands": [{
"command": "extension.helloWorld",
"title": "Hello World"
}]
},
"scripts": {
"vscode:prepublish": "<%= pkgManager %> run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "<%= pkgManager %> run compile",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/mocha": "^5.2.6",
"@types/node": "^10.12.21",
"@types/vscode": <%- JSON.stringify(vsCodeEngine) %>,
"glob": "^7.1.4",
"mocha": "^6.1.4",
"typescript": "^3.3.1",
"tslint": "^5.12.1",
"vscode-test": "^1.2.0"
}
}
@@ -0,0 +1,27 @@
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "<%= name %>" is now active!');
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
let disposable = vscode.commands.registerCommand('extension.helloWorld', () => {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
vscode.window.showInformationMessage('Hello World!');
});
context.subscriptions.push(disposable);
}
// this method is called when your extension is deactivated
export function deactivate() {}
@@ -0,0 +1,23 @@
import * as path from 'path';
import { runTests } from 'vscode-test';
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
main();
@@ -0,0 +1,18 @@
import * as assert from 'assert';
import { before } from 'mocha';
// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as vscode from 'vscode';
// import * as myExtension from '../extension';
suite('Extension Test Suite', () => {
before(() => {
vscode.window.showInformationMessage('Start all tests.');
});
test('Sample test', () => {
assert.equal(-1, [1, 2, 3].indexOf(5));
assert.equal(-1, [1, 2, 3].indexOf(0));
});
});
@@ -0,0 +1,37 @@
import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';
export function run(): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
ui: 'tdd',
});
mocha.useColors(true);
const testsRoot = path.resolve(__dirname, '..');
return new Promise((c, e) => {
glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
if (err) {
return e(err);
}
// Add files to the test suite
files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
try {
// Run the mocha test
mocha.run(failures => {
if (failures > 0) {
e(new Error(`${failures} tests failed.`));
} else {
c();
}
});
} catch (err) {
e(err);
}
});
});
}
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"lib": [
"es6"
],
"sourceMap": true,
"rootDir": "src",
"strict": true /* enable all strict type-checking options */
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": [
"node_modules",
".vscode-test"
]
}
@@ -0,0 +1,15 @@
{
"rules": {
"no-string-throw": true,
"no-unused-expression": true,
"no-duplicate-variable": true,
"curly": true,
"class-name": true,
"semicolon": [
true,
"always"
],
"triple-equals": true
},
"defaultSeverity": "warning"
}
@@ -0,0 +1,42 @@
# Welcome to your VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your extension.
* `package.json` - this is the manifest file in which you declare your extension and command.
* The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesnt yet need to load the plugin.
* `src/extension.ts` - this is the main file where you will provide the implementation of your command.
* The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
* We pass the function containing the implementation of the command as the second parameter to `registerCommand`.
## Get up and running straight away
* Press `F5` to open a new window with your extension loaded.
* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
* Set breakpoints in your code inside `src/extension.ts` to debug your extension.
* Find output from your extension in the debug console.
## Make changes
* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
## Explore the API
* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
## Run tests
* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`.
* Press `F5` to run the tests in a new window with your extension loaded.
* See the output of the test result in the debug console.
* Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder.
* The provided test runner will only consider files matching the name pattern `**.test.ts`.
* You can create folders inside the `test` folder to structure your tests any way you want.
## Go further
* Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).
* [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace.
* Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
@@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin"
]
}
@@ -0,0 +1,36 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: watch"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: watch"
}
]
}
@@ -0,0 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
@@ -0,0 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
@@ -0,0 +1,10 @@
.vscode/**
.vscode-test/**
out/test/**
src/**
.gitignore
vsc-extension-quickstart.md
**/tsconfig.json
**/tslint.json
**/*.map
**/*.ts
@@ -0,0 +1,9 @@
# Change Log
All notable changes to the "<%= name %>" extension pack will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release
@@ -0,0 +1,16 @@
# README
## This is the README for your extension pack "<%= name %>"
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
## For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
@@ -0,0 +1,3 @@
# Set default behavior to automatically normalize line endings.
* text=auto
@@ -0,0 +1,2 @@
node_modules
*.vsix
@@ -0,0 +1,16 @@
{
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
"categories": [
"Extension Packs"
],
"extensionPack": [ <% for (i=0; i<extensionList.length-1; i++) { %>
"<%- extensionList[i] %>", <%}%>
"<%- extensionList[extensionList.length-1]%>"
]
}
@@ -0,0 +1,21 @@
# Welcome to your VS Code Extension Pack
## What's in the folder
* This folder contains all of the files necessary for your extension pack.
* `package.json` - this is the manifest file that defines the list of extensions of the extension pack.
## Get up and running straight away
* Press `F5` to open a new window with your extension loaded.
* Open `Extensions Viewlet` and check your extensions are installed.
## Make changes
* You can relaunch the extension from the debug toolbar after making changes to the files listed above.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
## Install your extension
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
@@ -0,0 +1,18 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
@@ -0,0 +1,9 @@
# Change Log
All notable changes to the "<%= name %>" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release
@@ -0,0 +1,13 @@
# README
## This is the README for your extension "<%= name %>"
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
### For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
@@ -0,0 +1,3 @@
# Set default behavior to automatically normalize line endings.
* text=auto
@@ -0,0 +1,2 @@
node_modules
*.vsix
@@ -0,0 +1,20 @@
{
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
"categories": [
"Keymaps"
],
"contributes": {
"keybindings": [
{
"key": "ctrl+.",
"command": "workbench.action.showCommands"
}
]
}
}
@@ -0,0 +1,22 @@
# Welcome to your VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your extension pack.
* `package.json` - this is the manifest file that defines the list of keybindings of the extension.
## Get up and running straight away
* Press `F5` to open a new window with your extension loaded.
* Press `Ctrl + .` instead of `Ctrl + Shift + P`
* Verify that it will launch the Command Palette listing all available commands. The `Ctrl + .` keyboard shortcut was added as an example to you.
## Make changes
* You can relaunch the extension from the debug toolbar after making changes to the files listed above.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
## Install your extension
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
@@ -0,0 +1,18 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
@@ -0,0 +1,9 @@
# Change Log
All notable changes to the "<%= name %>" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release
@@ -0,0 +1,65 @@
# <%= name %> README
This is the README for your extension "<%= name %>". After writing up a brief description, we recommend including the following sections.
## Features
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
For example if there is an image subfolder under your extension project workspace:
\!\[feature X\]\(images/feature-x.png\)
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
## Requirements
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
For example:
This extension contributes the following settings:
* `myExtension.enable`: enable/disable this extension
* `myExtension.thing`: set to `blah` to do something
## Known Issues
Calling out known issues can help limit users opening duplicate issues against your extension.
## Release Notes
Users appreciate release notes as you update your extension.
### 1.0.0
Initial release of ...
### 1.0.1
Fixed issue #.
### 1.1.0
Added features X, Y, and Z.
-----------------------------------------------------------------------------------------------------------
## Working with Markdown
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
### For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
@@ -0,0 +1,3 @@
# Set default behavior to automatically normalize line endings.
* text=auto
@@ -0,0 +1,2 @@
node_modules
*.vsix
@@ -0,0 +1,30 @@
{
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "//",
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [ "/*", "*/" ]
},
// symbols used as brackets
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
// symbols that that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}
@@ -0,0 +1,25 @@
{
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
"categories": [
"Programming Languages"
],
"contributes": {
"languages": [{
"id": <%- JSON.stringify(languageId) %>,
"aliases": [<%- JSON.stringify(languageName) %>, <%- JSON.stringify(languageId) %>],
"extensions": <%- JSON.stringify(languageExtensions) %>,
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": <%- JSON.stringify(languageId) %>,
"scopeName": <%- JSON.stringify(languageScopeName) %>,
"path": <%- JSON.stringify("./syntaxes/" + languageFileName) %>
}]
}
}
@@ -0,0 +1 @@
<%- languageContent %>
@@ -0,0 +1,32 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": <%-JSON.stringify(languageName)%>,
"patterns": [
{
"include": "#keywords"
},
{
"include": "#strings"
}
],
"repository": {
"keywords": {
"patterns": [{
"name": "keyword.control.<%-languageId%>",
"match": "\\b(if|while|for|return)\\b"
}]
},
"strings": {
"name": "string.quoted.double.<%-languageId%>",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.<%-languageId%>",
"match": "\\\\."
}
]
}
},
"scopeName": <%-JSON.stringify(languageScopeName)%>
}
@@ -0,0 +1,29 @@
# Welcome to your VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your extension.
* `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension.
* `syntaxes/<%= languageFileName %>` - this is the Text mate grammar file that is used for tokenization.
* `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets.
## Get up and running straight away
* Make sure the language configuration settings in `language-configuration.json` are accurate.
* Press `F5` to open a new window with your extension loaded.
* Create a new file with a file name suffix matching your language.
* Verify that syntax highlighting works and that the language configuration settings are working.
## Make changes
* You can relaunch the extension from the debug toolbar after making changes to the files listed above.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
## Add more language features
* To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs
## Install your extension
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
@@ -0,0 +1,18 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
@@ -0,0 +1,9 @@
# Change Log
All notable changes to the "<%= name %>" language pack will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release
@@ -0,0 +1,10 @@
# <%= lpLanguageName %> Language Pack for VS Code
Adds localization for <%= lpLanguageName %> to VS Code.
The translated strings are maintained here:
* [vscode-editor project](https://www.transifex.com/microsoft-oss/vscode-editor/language/<%= lpLanguageId %>/)
* [vscode-workbench project](https://www.transifex.com/microsoft-oss/vscode-workbench/language/<%= lpLanguageId %>/)
* [vscode-extensions project](https://www.transifex.com/microsoft-oss/vscode-extensions/language/<%= lpLanguageId %>/)
If you'd like to participate in the translation, see https://github.com/Microsoft/Localization/wiki/Visual-Studio-Code-Community-Localization-Project for more information.
@@ -0,0 +1,3 @@
# Set default behavior to automatically normalize line endings.
* text=auto
@@ -0,0 +1,2 @@
node_modules
*.vsix
@@ -0,0 +1,22 @@
{
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
"categories": [
"Language Packs"
],
"contributes": {
"localizations": [{
"languageId": <%- JSON.stringify(lpLanguageId) %>,
"languageName": <%- JSON.stringify(lpLanguageName) %>,
"localizedLanguageName": <%- JSON.stringify(lpLocalizedLanguageName) %>
}]
},
"scripts": {
"update": "cd ../vscode && <%= pkgManager %> run update-localization-extension <%- lpLanguageId %>"
}
}
@@ -0,0 +1,123 @@
# Welcome to the <%= lpLanguageName %> language pack
## What's in the folder
* `package.json` - the manifest file, defining the name and description of the localization extension. It also contains the `localizations` contribution point that defines the language id:
```json
"contributes": {
"localization": [{
"languageId": <%- JSON.stringify(lpLanguageId) %>,
"languageName": <%- JSON.stringify(lpLanguageName) %>,
"localizedLanguageName": <%- JSON.stringify(lpLocalizedLanguageName) %>
}]
}
```
* `translations` - the folder containing the translation strings
To create/update the `translations` folder with the latest strings from transifex, follow these steps:
* Get an API token from https://www.transifex.com/user/settings/api. The token needs to have access to the `vscode-editor`, `vscode-workbench` and `vscode-extensions` projects.
* Set the API token to the environment variable `TRANSIFEX_API_TOKEN`.
* Check out the `master` branch of the [VS Code repository](https://github.com/Microsoft/vscode).
* Preferably, place the VSCode repo next to the language pack extension (so both have the same parent folder).
* `cd vscode` and run `yarn` to initialize the VS Code repo. More information on how to build VS Code you can find [here](https://github.com/Microsoft/vscode/wiki/How-to-Contribute).
* If the language pack extension is placed next to the VS Code repository: `npm run update-localization-extension <%- lpLanguageId %>`
* Otherwise: `npm run update-localization-extension {path_to_lang_pack_ext}`
* This will download translation files to the folder `translations`
* `package.json` will be modified and add a `translations` property with paths to each extension's translations will be added.
```json
"contributes": {
"localizations": [
{
"languageId": <%- JSON.stringify(lpLanguageId) %>,
"languageName": <%- JSON.stringify(lpLanguageName) %>,
"localizedLanguageName": <%- JSON.stringify(lpLocalizedLanguageName) %>,
"translations": [
{
"id": "vscode",
"path": "./translations/main.i18n.json"
},
{
"id": "vscode.emmet",
"path": "./translations/extensions/emmet.i18n.json"
},
{
"id": "vscode.css",
"path": "./translations/extensions/css.i18n.json"
},
{
"id": "vscode.grunt",
"path": "./translations/extensions/grunt.i18n.json"
},
{
"id": "vscode.git",
"path": "./translations/extensions/git.i18n.json"
},
{
"id": "vscode.gulp",
"path": "./translations/extensions/gulp.i18n.json"
},
{
"id": "vscode.jake",
"path": "./translations/extensions/jake.i18n.json"
},
{
"id": "vscode.html",
"path": "./translations/extensions/html.i18n.json"
},
{
"id": "vscode.json",
"path": "./translations/extensions/json.i18n.json"
},
{
"id": "vscode.markdown",
"path": "./translations/extensions/markdown.i18n.json"
},
{
"id": "vscode.merge-conflict",
"path": "./translations/extensions/merge-conflict.i18n.json"
},
{
"id": "vscode.npm",
"path": "./translations/extensions/npm.i18n.json"
},
{
"id": "vscode.php",
"path": "./translations/extensions/php.i18n.json"
},
{
"id": "vscode.extension-editing",
"path": "./translations/extensions/extension-editing.i18n.json"
},
{
"id": "vscode.typescript",
"path": "./translations/extensions/typescript.i18n.json"
},
{
"id": "vscode.configuration-editing",
"path": "./translations/extensions/configuration-editing.i18n.json"
},
{
"id": "vscode.javascript",
"path": "./translations/extensions/javascript.i18n.json"
},
{
"id": "ms-vscode.node-debug2",
"path": "./translations/extensions/vscode-node-debug2.i18n.json"
},
{
"id": "msjsdiag.debugger-for-chrome",
"path": "./translations/extensions/vscode-chrome-debug.i18n.json"
},
{
"id": "ms-vscode.node-debug",
"path": "./translations/extensions/vscode-node-debug.i18n.json"
}
]
}
]
}
```
@@ -0,0 +1,5 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
node_modules
@@ -0,0 +1,9 @@
# Change Log
All notable changes to the "<%= name %>" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release
@@ -0,0 +1,65 @@
# <%= name %> README
This is the README for your extension "<%= name %>". After writing up a brief description, we recommend including the following sections.
## Features
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
For example if there is an image subfolder under your extension project workspace:
\!\[feature X\]\(images/feature-x.png\)
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
## Requirements
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
For example:
This extension contributes the following settings:
* `myExtension.enable`: enable/disable this extension
* `myExtension.thing`: set to `blah` to do something
## Known Issues
Calling out known issues can help limit users opening duplicate issues against your extension.
## Release Notes
Users appreciate release notes as you update your extension.
### 1.0.0
Initial release of ...
### 1.0.1
Fixed issue #.
### 1.1.0
Added features X, Y, and Z.
-----------------------------------------------------------------------------------------------------------
## Working with Markdown
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
### For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
@@ -0,0 +1,3 @@
# Set default behavior to automatically normalize line endings.
* text=auto
@@ -0,0 +1,2 @@
node_modules
*.vsix
@@ -0,0 +1,20 @@
{
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
"categories": [
"Snippets"
],
"contributes": {
"snippets": [
{
"language": <%- JSON.stringify(languageId) %>,
"path": "./snippets/snippets.json"
}
]
}
}
@@ -0,0 +1 @@
<%- JSON.stringify(snippets, null, '\t') %>
@@ -0,0 +1,23 @@
# Welcome to your VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your extension.
* `package.json` - this is the manifest file that defines the location of the snippet file and specifies the language of the snippets.
* `snippets/snippets.json` - the file containing all snippets.
## Get up and running straight away
* Press `F5` to open a new window with your extension loaded.
* Create a new file with a file name suffix matching your language.
* Verify that your snippets are proposed on intellisense.
## Make changes
* You can relaunch the extension from the debug toolbar after making changes to the files listed above.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
## Install your extension
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
@@ -0,0 +1,18 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
@@ -0,0 +1,168 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
'use strict';
var path = require('path');
var fs = require('fs');
var plistParser = require('fast-plist');
var request = require('request');
function convertTheme(location, extensionConfig, inline, generator) {
if (!location) {
extensionConfig.tmThemeFileName = '';
extensionConfig.tmThemeContent = '';
} else if (location.match(/\w*:\/\//)) {
// load from url
return new Promise(function (resolve, reject) {
request(location, function (error, response, body) {
if (!error && response.statusCode == 200) {
var tmThemeFileName = null;
if (!inline) {
var contentDisposition = response.headers['content-disposition'];
if (contentDisposition) {
var fileNameMatch = contentDisposition.match(/filename="([^"]*)/);
if (fileNameMatch) {
tmThemeFileName = fileNameMatch[1];
}
}
if (!tmThemeFileName) {
var lastSlash = location.lastIndexOf('/');
if (lastSlash) {
tmThemeFileName = location.substr(lastSlash + 1);
} else {
tmThemeFileName = 'theme.tmTheme';
}
}
}
processContent(extensionConfig, tmThemeFileName, body, generator);
resolve();
} else {
if (error) {
reject("Problems loading theme: " + error);
} else {
reject("Problems loading theme: HTTP status " + response.statusCode);
}
}
});
});
} else {
// load from disk
var body = null;
try {
body = fs.readFileSync(location);
} catch (error) {
return Promise.reject("Problems loading theme: " + error.message);
}
if (body) {
var fileName = null;
if (!inline) {
fileName = path.basename(location);
}
processContent(extensionConfig, fileName, body.toString(), generator);
} else {
return Promise.reject("Problems loading theme: Not found");
}
}
return Promise.resolve();
}
function processContent(extensionConfig, tmThemeFileName, body, generator) {
var themeNameMatch = body.match(/<key>name<\/key>\s*<string>([^<]*)/);
var themeName = themeNameMatch ? themeNameMatch[1] : '';
extensionConfig.themeContent = migrate(body, tmThemeFileName, generator);
if (tmThemeFileName) {
if (tmThemeFileName.indexOf('.tmTheme') === -1) {
tmThemeFileName = tmThemeFileName + '.tmTheme';
}
extensionConfig.tmThemeFileName = tmThemeFileName;
extensionConfig.tmThemeContent = body;
}
extensionConfig.themeName = themeName;
extensionConfig.displayName = themeName;
};
// mapping from old tmTheme setting to new workbench color ids
var mappings = {
"background": ["editor.background"],
"foreground": ["editor.foreground"],
"hoverHighlight": ["editor.hoverHighlightBackground"],
"linkForeground": ["editorLink.foreground"],
"selection": ["editor.selectionBackground"],
"inactiveSelection": ["editor.inactiveSelectionBackground"],
"selectionHighlightColor": ["editor.selectionHighlightBackground"],
"wordHighlight": ["editor.wordHighlightBackground"],
"wordHighlightStrong": ["editor.wordHighlightStrongBackground"],
"findMatchHighlight": ["editor.findMatchHighlightBackground", "peekViewResult.matchHighlightBackground"],
"currentFindMatchHighlight": ["editor.findMatchBackground"],
"findRangeHighlight": ["editor.findRangeHighlightBackground"],
"referenceHighlight": ["peekViewEditor.matchHighlightBackground"],
"lineHighlight": ["editor.lineHighlightBackground"],
"rangeHighlight": ["editor.rangeHighlightBackground"],
"caret": ["editorCursor.foreground"],
"invisibles": ["editorWhitespace.foreground"],
"guide": ["editorIndentGuide.background"],
"ansiBlack": ["terminal.ansiBlack"], "ansiRed": ["terminal.ansiRed"], "ansiGreen": ["terminal.ansiGreen"], "ansiYellow": ["terminal.ansiYellow"],
"ansiBlue": ["terminal.ansiBlue"], "ansiMagenta": ["terminal.ansiMagenta"], "ansiCyan": ["terminal.ansiCyan"], "ansiWhite": ["terminal.ansiWhite"],
"ansiBrightBlack": ["terminal.ansiBrightBlack"], "ansiBrightRed": ["terminal.ansiBrightRed"], "ansiBrightGreen": ["terminal.ansiBrightGreen"],
"ansiBrightYellow": ["terminal.ansiBrightYellow"], "ansiBrightBlue": ["terminal.ansiBrightBlue"], "ansiBrightMagenta": ["terminal.ansiBrightMagenta"],
"ansiBrightCyan": ["terminal.ansiBrightCyan"], "ansiBrightWhite": ["terminal.ansiBrightWhite"]
};
function migrate(content, tmThemeFileName, generator) {
try {
let result = {};
var theme;
try {
theme = plistParser.parse(content);
} catch (e) {
generator.log(tmThemeFileName + " not be parsed: " + e.toString());
return undefined;
}
let settings = theme.settings;
if (Array.isArray(settings)) {
let colorMap = {};
for (let entry of settings) {
let scope = entry.scope;
if (scope) {
let parts = scope.split(',').map(p => p.trim());
if (parts.length > 1) {
entry.scope = parts;
}
} else {
var entrySettings = entry.settings;
let notSupported = [];
for (let entry in entrySettings) {
let mapping = mappings[entry];
if (mapping) {
for (let newKey of mapping) {
colorMap[newKey] = entrySettings[entry];
}
if (entry !== 'foreground' && entry !== 'background') {
delete entrySettings[entry];
}
} else {
notSupported.push(entry);
}
}
if (notSupported.length > 0) {
generator.log('Note: the following theming properties are not supported by VSCode and will be ignored: ' + notSupported.join(', '))
}
}
}
if (!tmThemeFileName) {
result.tokenColors = settings;
} else {
result.tokenColors = './' + tmThemeFileName;
}
result.colors = colorMap;
}
return result
} catch (e) {
console.log(e);
}
};
exports.convertTheme = convertTheme;
@@ -0,0 +1,32 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
var nameRegex = /^[a-z0-9][a-z0-9\-]*$/i;
module.exports.validatePublisher = function(publisher) {
if (!publisher) {
return "Missing publisher name";
}
if (!nameRegex.test(publisher)) {
return "Invalid publisher name";
}
return true;
}
module.exports.validateExtensionId = function(id) {
if (!id) {
return "Missing extension identifier";
}
if (!nameRegex.test(id)) {
return "Invalid extension identifier";
}
return true;
}
module.exports.validateNonEmpty = function(name) {
return name && name.length > 0;
}
+1
View File
@@ -0,0 +1 @@
../../../yosay/cli.js
+55
View File
@@ -0,0 +1,55 @@
{
"name": "generator-code",
"version": "1.2.6",
"description": "Yeoman generator for Visual Studio Code Extensions",
"keywords": [
"yeoman-generator",
"vscode",
"visual studio",
"visual studio code",
"vs code",
"extensions"
],
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/vscode-generator-code.git"
},
"bugs": {
"url": "https://github.com/Microsoft/vscode-generator-code/issues"
},
"main": "./generators/app/index.js",
"homepage": "http://code.visualstudio.com",
"license": "MIT",
"author": {
"name": "VS Code Team",
"url": "https://github.com/Microsoft"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha",
"prepublish": "npm test",
"preversion": "npm test",
"postversion": "git push && git push --tags"
},
"dependencies": {
"assert-plus": "^1.0.0",
"chalk": "^2.4.2",
"fast-plist": "^0.1.2",
"request": "^2.88.0",
"sanitize-filename": "^1.6.1",
"sax": "^1.2.4",
"yeoman-generator": "^3.2.0",
"yosay": "^2.0.2"
},
"devDependencies": {
"@types/mocha": "^5.2.6",
"@types/node": "^11.10.4",
"@types/yeoman-generator": "^3.1.0",
"mocha": "^6.1.4",
"yeoman-assert": "^3.1.1",
"yeoman-test": "^1.9.1",
"yo": "^2.0.5"
}
}
+27
View File
@@ -0,0 +1,27 @@
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
For Microsoft vscode-generator-code-extension
This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). Microsoft is not the original author of the Third Party Code. The original copyright notice and license under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed to you under their original license terms set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.
1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)
This project is licensed under the MIT license.
Copyrights are respective of each contributor listed at the beginning of each definition file.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB