Skip to content

Commit fc5256e

Browse files
Merge pull request #1 from microsoft/Init-extension
Init extension
2 parents ca9e2cc + 269571b commit fc5256e

File tree

98 files changed

+18705
-0
lines changed

Some content is hidden

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

98 files changed

+18705
-0
lines changed

.eslintrc.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
"@typescript-eslint/naming-convention": "warn",
13+
"@typescript-eslint/semi": "warn",
14+
"curly": "warn",
15+
"eqeqeq": "warn",
16+
"no-throw-literal": "warn",
17+
"semi": "off"
18+
},
19+
"ignorePatterns": [
20+
"out",
21+
"dist",
22+
"**/*.d.ts"
23+
]
24+
}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
out
2+
dist
3+
node_modules
4+
.vscode-test/
5+
*.vsix
6+
.venv/
7+
.nox/
8+
bundled/libs/
9+
**/__pycache__
10+
**/.pytest_cache
11+
**/.vs

.prettierrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
singleQuote: true,
3+
printWidth: 120,
4+
tabWidth: 4,
5+
endOfLine: 'auto',
6+
trailingComma: 'all',
7+
overrides: [
8+
{
9+
files: ['*.yml', '*.yaml'],
10+
options: {
11+
tabWidth: 2
12+
}
13+
}
14+
]
15+
};

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
5+
}

.vscode/launch.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}"
14+
],
15+
"outFiles": [
16+
"${workspaceFolder}/dist/**/*.js"
17+
],
18+
"preLaunchTask": "${defaultBuildTask}"
19+
},
20+
{
21+
"name": "Unit Tests",
22+
"type": "extensionHost",
23+
"request": "launch",
24+
"runtimeExecutable": "${execPath}",
25+
"args": [
26+
"./out/test/**/*.unit.test.js",
27+
"--extensionDevelopmentPath=${workspaceFolder}",
28+
"--extensionTestsPath=${workspaceFolder}/out/test/unittest/index"
29+
],
30+
"outFiles": [
31+
"${workspaceFolder}/out/**/*.js",
32+
],
33+
"preLaunchTask": "tasks: watch-tests"
34+
},
35+
]
36+
}

.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+
"files.exclude": {
4+
"out": false, // set this to true to hide the "out" folder with the compiled JS files
5+
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
6+
},
7+
"search.exclude": {
8+
"out": true, // set this to false to include "out" folder in search results
9+
"dist": true // set this to false to include "dist" folder in search results
10+
},
11+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
12+
"typescript.tsc.autoDetect": "off"
13+
}

.vscode/tasks.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$ts-webpack-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never",
13+
"group": "watchers"
14+
},
15+
"group": {
16+
"kind": "build",
17+
"isDefault": true
18+
}
19+
},
20+
{
21+
"type": "npm",
22+
"script": "watch-tests",
23+
"problemMatcher": "$tsc-watch",
24+
"isBackground": true,
25+
"presentation": {
26+
"reveal": "never",
27+
"group": "watchers"
28+
},
29+
"group": "build"
30+
},
31+
{
32+
"label": "tasks: watch-tests",
33+
"dependsOn": [
34+
"npm: watch",
35+
"npm: watch-tests"
36+
],
37+
"problemMatcher": []
38+
}
39+
]
40+
}

.vscodeignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.vscode/**
2+
.vscode-test/**
3+
out/**
4+
node_modules/**
5+
src/**
6+
.gitignore
7+
.yarnrc
8+
webpack.config.js
9+
vsc-extension-quickstart.md
10+
**/tsconfig.json
11+
**/.eslintrc.json
12+
**/*.ts
13+
.venv/**
14+
.nox/**
15+
.github/
16+
**/__pycache__/**
17+
**/.pyc
18+
bundled/libs/bin/**
19+
noxfile.py
20+
.pytest_cache/**
21+
.pylintrc
22+
**/requirements.txt
23+
**/requirements.in

build/azure-pipeline.pre-release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Run on a schedule
2+
trigger: none
3+
pr: none
4+
5+
schedules:
6+
- cron: '0 10 * * 1-5' # 10AM UTC (2AM PDT) MON-FRI (VS Code Pre-release builds at 9PM PDT)
7+
displayName: Nightly Pre-Release Schedule
8+
always: false # only run if there are source code changes
9+
branches:
10+
include:
11+
- main
12+
13+
resources:
14+
repositories:
15+
- repository: templates
16+
type: github
17+
name: microsoft/vscode-engineering
18+
ref: main
19+
endpoint: Monaco
20+
21+
extends:
22+
template: azure-pipelines/extension/pre-release.yml@templates
23+
parameters:
24+
locTsConfigs: $(Build.SourcesDirectory)/tsconfig.json
25+
locBundleDestination: $(Build.SourcesDirectory)/dist
26+
buildSteps:
27+
- task: NodeTool@0
28+
inputs:
29+
versionSpec: '16.17.1'
30+
displayName: Select Node version
31+
32+
- task: UsePythonVersion@0
33+
inputs:
34+
versionSpec: '3.7'
35+
addToPath: true
36+
architecture: 'x64'
37+
displayName: Select Python version
38+
39+
- script: npm ci
40+
displayName: Install NPM dependencies
41+
42+
- script: python -m pip install -U pip
43+
displayName: Upgrade pip
44+
45+
- script: python -m pip install wheel
46+
displayName: Install wheel
47+
48+
- script: python -m pip install nox
49+
displayName: Install wheel
50+
51+
- script: python -m nox --session install_bundled_libs
52+
displayName: Install Python dependencies
53+
54+
- script: python ./build/update_ext_version.py --for-publishing
55+
displayName: Update build number
56+
57+
- script: npm run package
58+
displayName: Build extension

build/azure-pipeline.stable.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
trigger: none
2+
# branches:
3+
# include:
4+
# - release*
5+
# tags:
6+
# include: ['*']
7+
pr: none
8+
9+
resources:
10+
repositories:
11+
- repository: templates
12+
type: github
13+
name: microsoft/vscode-engineering
14+
ref: main
15+
endpoint: Monaco
16+
17+
parameters:
18+
- name: publishExtension
19+
displayName: 🚀 Publish Extension
20+
type: boolean
21+
default: false
22+
23+
extends:
24+
template: azure-pipelines/extension/stable.yml@templates
25+
parameters:
26+
locTsConfigs: $(Build.SourcesDirectory)/tsconfig.json
27+
locBundleDestination: $(Build.SourcesDirectory)/dist
28+
publishExtension: ${{ parameters.publishExtension }}
29+
buildSteps:
30+
- task: NodeTool@0
31+
inputs:
32+
versionSpec: '16.17.1'
33+
displayName: Select Node version
34+
35+
- task: UsePythonVersion@0
36+
inputs:
37+
versionSpec: '3.7'
38+
addToPath: true
39+
architecture: 'x64'
40+
displayName: Select Python version
41+
42+
- script: npm ci
43+
displayName: Install NPM dependencies
44+
45+
- script: python -m pip install -U pip
46+
displayName: Upgrade pip
47+
48+
- script: python -m pip install wheel
49+
displayName: Install wheel
50+
51+
- script: python -m pip install nox
52+
displayName: Install wheel
53+
54+
- script: python -m nox --session install_bundled_libs
55+
displayName: Install Python dependencies
56+
57+
- script: python ./build/update_ext_version.py --release --for-publishing
58+
displayName: Update build number
59+
60+
- script: npm run package
61+
displayName: Build extension

0 commit comments

Comments
 (0)