Skip to content

Commit f97b9a0

Browse files
Nikola HristovNikola Hristov
authored andcommitted
Merge remote-tracking branch 'Parent/main' into Current
2 parents 82201b4 + 6e3f05a commit f97b9a0

File tree

125 files changed

+14080
-3260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+14080
-3260
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_style = space
8+
indent_size = 2
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.js]
13+
indent_size = 4
14+
15+
[*.json]
16+
indent_size = 4

.github/assignment.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
perform: true,
3+
assignees: [ aeschli ]
4+
}

.github/needs_more_info.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
daysUntilClose: 7,
3+
needsMoreInfoLabel: 'needs more info',
4+
perform: true,
5+
closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
6+
}

.github/workflows/tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Tests CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [18.x, 20.x]
17+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- run: npm ci
26+
- name: Run headless test
27+
uses: coactions/setup-xvfb@v1
28+
with:
29+
run: npm test

.vscode/launch.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
// Use IntelliSense to learn about possible Node.js debug attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
// make sure to have this generator npm-linked:
9+
// $ git clone https://github.com/Microsoft/vscode-generator-code
10+
// $ cd vscode-generator-code
11+
// $ npm link
12+
//
13+
"type": "node",
14+
"request": "launch",
15+
"name": "yeoman code",
16+
"program": "${workspaceFolder}/node_modules/yeoman-environment/cli/index.js",
17+
"args": [ "run", "code" ],
18+
"cwd": "${workspaceFolder}",
19+
"console": "integratedTerminal",
20+
"internalConsoleOptions": "neverOpen"
21+
},
22+
{
23+
"type": "node",
24+
"request": "launch",
25+
"name": "Mocha Tests",
26+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
27+
"cwd": "${workspaceFolder}",
28+
"console": "integratedTerminal",
29+
"internalConsoleOptions": "openOnSessionStart"
30+
}
31+
]
32+
}

.vscode/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"editor.insertSpaces": true,
4+
"files.eol": "\n",
5+
"files.trimTrailingWhitespace": true,
6+
"git.branchProtection": [
7+
"main"
8+
],
9+
"git.branchProtectionPrompt": "alwaysCommitToNewBranch",
10+
"git.branchRandomName.enable": true,
11+
"githubPullRequests.assignCreated": "${user}",
12+
"githubPullRequests.defaultMergeMethod": "squash"
13+
}

LICENSE

Lines changed: 12 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,23 @@
1-
Creative Commons Legal Code
2-
3-
CC0 1.0 Universal
4-
5-
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6-
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7-
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8-
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9-
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10-
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11-
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12-
HEREUNDER.
13-
14-
Statement of Purpose
15-
16-
The laws of most jurisdictions throughout the world automatically confer
17-
exclusive Copyright and Related Rights (defined below) upon the creator and
18-
subsequent owner(s) (each and all, an "owner") of an original work of authorship
19-
and/or a database (each, a "Work").
20-
21-
Certain owners wish to permanently relinquish those rights to a Work for the
22-
purpose of contributing to a commons of creative, cultural and scientific works
23-
("Commons") that the public can reliably and without fear of later claims of
24-
infringement build upon, modify, incorporate in other works, reuse and
25-
redistribute as freely as possible in any form whatsoever and for any purposes,
26-
including without limitation commercial purposes. These owners may contribute to
27-
the Commons to promote the ideal of a free culture and the further production of
28-
creative, cultural and scientific works, or to gain reputation or greater
29-
distribution for their Work in part through the use and efforts of others.
30-
31-
For these and/or other purposes and motivations, and without any expectation of
32-
additional consideration or compensation, the person associating CC0 with a Work
33-
(the "Affirmer"), to the extent that he or she is an owner of Copyright and
34-
Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
35-
publicly distribute the Work under its terms, with knowledge of his or her
36-
Copyright and Related Rights in the Work and the meaning and intended legal
37-
effect of CC0 on those rights.
38-
39-
1. Copyright and Related Rights. A Work made available under CC0 may be
40-
protected by copyright and related or neighboring rights ("Copyright and
41-
Related Rights"). Copyright and Related Rights include, but are not limited
42-
to, the following:
43-
44-
i. the right to reproduce, adapt, distribute, perform, display, communicate, and
45-
translate a Work; ii. moral rights retained by the original author(s) and/or
46-
performer(s); iii. publicity and privacy rights pertaining to a person's image
47-
or likeness depicted in a Work; iv. rights protecting against unfair competition
48-
in regards to a Work, subject to the limitations in paragraph 4(a), below; v.
49-
rights protecting the extraction, dissemination, use and reuse of data in a
50-
Work; vi. database rights (such as those arising under Directive 96/9/EC of the
51-
European Parliament and of the Council of 11 March 1996 on the legal protection
52-
of databases, and under any national implementation thereof, including any
53-
amended or successor version of such directive); and vii. other similar,
54-
equivalent or corresponding rights throughout the world based on applicable law
55-
or treaty, and any national implementations thereof.
56-
57-
2. Waiver. To the greatest extent permitted by, but not in contravention of,
58-
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
59-
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
60-
and Related Rights and associated claims and causes of action, whether now
61-
known or unknown (including existing as well as future claims and causes of
62-
action), in the Work (i) in all territories worldwide, (ii) for the maximum
63-
duration provided by applicable law or treaty (including future time
64-
extensions), (iii) in any current or future medium and for any number of
65-
copies, and (iv) for any purpose whatsoever, including without limitation
66-
commercial, advertising or promotional purposes (the "Waiver"). Affirmer
67-
makes the Waiver for the benefit of each member of the public at large and to
68-
the detriment of Affirmer's heirs and successors, fully intending that such
69-
Waiver shall not be subject to revocation, rescission, cancellation,
70-
termination, or any other legal or equitable action to disrupt the quiet
71-
enjoyment of the Work by the public as contemplated by Affirmer's express .
72-
73-
3. Public License Fallback. Should any part of the Waiver for any reason be
74-
judged legally invalid or ineffective under applicable law, then the Waiver
75-
shall be preserved to the maximum extent permitted taking into account
76-
Affirmer's express . In addition, to the extent the Waiver is so judged
77-
Affirmer hereby grants to each affected person a royalty-free, non
78-
transferable, non sublicensable, non exclusive, irrevocable and unconditional
79-
license to exercise Affirmer's Copyright and Related Rights in the Work (i)
80-
in all territories worldwide, (ii) for the maximum duration provided by
81-
applicable law or treaty (including future time extensions), (iii) in any
82-
current or future medium and for any number of copies, and (iv) for any
83-
purpose whatsoever, including without limitation commercial, advertising or
84-
promotional purposes (the "License"). The License shall be deemed effective
85-
as of the date CC0 was applied by Affirmer to the Work. Should any part of
86-
the License for any reason be judged legally invalid or ineffective under
87-
applicable law, such partial invalidity or ineffectiveness shall not
88-
invalidate the remainder of the License, and in such case Affirmer hereby
89-
affirms that he or she will not (i) exercise any of his or her remaining
90-
Copyright and Related Rights in the Work or (ii) assert any associated claims
91-
and causes of action with respect to the Work, in either case contrary to
92-
93-
4. Limitations and Disclaimers.
94-
95-
a. No trademark or patent rights held by Affirmer are waived, abandoned,
96-
surrendered, licensed or otherwise affected by this document. b. Affirmer offers
97-
the Work as-is and makes no representations or warranties of any kind concerning
98-
the Work, express, implied, statutory or otherwise, including without limitation
99-
warranties of title, merchantability, fitness for a particular purpose, non
100-
infringement, or the absence of latent or other defects, accuracy, or the
101-
present or absence of errors, whether or not discoverable, all to the greatest
102-
extent permissible under applicable law. c. Affirmer disclaims responsibility
103-
for clearing rights of other persons that may apply to the Work or any use
104-
thereof, including without limitation any person's Copyright and Related Rights
105-
in the Work. Further, Affirmer disclaims responsibility for obtaining any
106-
necessary consents, permissions or other rights required for any use of the
107-
Work. d. Affirmer understands and acknowledges that Creative Commons is not a
108-
party to this document and has no duty or obligation with respect to this CC0 or
109-
use of the Work.
110-
111-
---
112-
113-
Note: The above license applies only to the modifications made by PlayForm to
114-
the original work. The original work is licensed under the following licenses
115-
and is subject to their terms and conditions:
116-
1171
vscode-generator-code
1182

1193
The MIT License (MIT)
1204

1215
Copyright (c) Microsoft Corporation
1226

123-
Permission is hereby granted, free of charge, to any person obtaining a copy of
124-
this software and associated documentation files (the "Software"), to deal in
125-
the Software without restriction, including without limitation the rights to
126-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
127-
the Software, and to permit persons to whom the Software is furnished to do so,
128-
subject to the following conditions:
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
12913

13014
The above copyright notice and this permission notice shall be included in all
13115
copies or substantial portions of the Software.
13216

13317
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
134-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
135-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
136-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
137-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
138-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

README.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Yo Code - Extension and Customization Generator
2+
[![npm Package](https://img.shields.io/npm/v/generator-code.svg?style=flat-square)](https://www.npmjs.org/package/generator-code)
3+
[![NPM Downloads](https://img.shields.io/npm/dm/generator-code.svg)](https://npmjs.org/package/generator-code)
4+
[![Build Status](https://github.com/microsoft/vscode-generator-code/actions/workflows/tests.yml/badge.svg)](https://github.com/microsoft/vscode-generator-code/actions/tests.yml)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6+
7+
We have written a Yeoman generator to help get you started. We plan to add templates for most extension/customization types into this.
8+
9+
## Install the Generator
10+
11+
Install Yeoman and the VS Code Extension generator:
12+
13+
```bash
14+
npm install -g yo generator-code
15+
```
16+
17+
## Run Yo Code
18+
19+
The Yeoman generator will walk you through the steps required to create your customization or extension prompting for the required information.
20+
21+
To launch the generator simply type:
22+
23+
```bash
24+
yo code
25+
```
26+
27+
![The command generator](yocode.png)
28+
29+
## Generator Output
30+
31+
These templates will:
32+
33+
* Create a base folder structure
34+
* Template out a rough `package.json`
35+
* Import any assets required for your extension e.g. tmBundles or the VS Code Library
36+
* For Extensions: Set-up `launch.json` for running your extension and attaching to a process
37+
38+
## Command line
39+
40+
```
41+
Usage:
42+
yo code [<destination>] [options]
43+
44+
Argument (optional):
45+
The destination to create the extension in, absolute or relative to the current working
46+
directory. Use '.' for the current folder.
47+
If not provided, defaults to a folder in the current working directory with the extension
48+
display name.
49+
50+
Options:
51+
-h, --help # Print the generator's options and usage
52+
-i, --insiders # Show the insiders options for the generator
53+
-q, --quick # Quick mode, skip all optional prompts and use defaults
54+
-o, --open # Open the generated extension in Visual Studio Code
55+
-O, --openInInsiders # Open the generated extension in Visual Studio Code Insiders
56+
-t, --extensionType # ts, js, colortheme, language, snippets, keymap...
57+
--extensionId # Id of the extension
58+
--extensionDescription # Description of the extension
59+
--pkgManager # 'npm', 'yarn' or 'pnpm'
60+
--bundle # 'webpack', 'esbuild'. Bundle the extension with webpack or esbuild
61+
--gitInit # Initialize a git repo
62+
63+
Example usages:
64+
yo code # Create an extension in a folder with the extension's name.
65+
yo code . -O # Create an extension in current folder and open with code-insiders
66+
yo code Hello -t=ts -q # Create an TypeScript extension in './Hello', skip prompts, use defaults.
67+
yo code --insiders # Show the insiders options for the generator
68+
```
69+
70+
## Run Generator using Docker
71+
72+
If you don't want to install nodejs or any node packages, use this method to containerize the generator.
73+
74+
Go into your project directory.
75+
76+
```bash
77+
cd <project directory>
78+
```
79+
80+
Build the docker image from the docker file.
81+
82+
```bash
83+
docker build -t vscode-generator-code .
84+
```
85+
86+
Create a docker container with volumes.
87+
88+
```bash
89+
docker run -it -v $(pwd):/usr/src/app vscode-generator-code
90+
```
91+
92+
## Local development
93+
94+
After making necessary changes, run `npm link` before running `yo code` to
95+
test the local version.
96+
97+
You can learn more about Yeoman generator development on its
98+
[documentation website](https://yeoman.io/authoring/index.html).
99+
100+
## History
101+
102+
* 1.0.0: Generates a VS Code extension for TypeScript 2.0.3
103+
* 0.10.x: Generates a VS Code extension for TypeScript 1.8.10
104+
105+
## License
106+
107+
[MIT](LICENSE)

0 commit comments

Comments
 (0)