mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Splits github fs out into its own extension
This commit is contained in:
parent
3a14f91f96
commit
91589cbf8d
3
extensions/github-browser/.gitignore
vendored
Normal file
3
extensions/github-browser/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
dist
|
||||
out
|
||||
node_modules
|
11
extensions/github-browser/.vscodeignore
Normal file
11
extensions/github-browser/.vscodeignore
Normal file
|
@ -0,0 +1,11 @@
|
|||
.vscode/**
|
||||
build/**
|
||||
dist/**
|
||||
out/**
|
||||
src/**
|
||||
typings/**
|
||||
.gitignore
|
||||
extension-browser.webpack.config.js
|
||||
extension.webpack.config.js
|
||||
tsconfig.json
|
||||
yarn.lock
|
7
extensions/github-browser/README.md
Normal file
7
extensions/github-browser/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# GitHub FileSystem for Visual Studio Code
|
||||
|
||||
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
|
||||
|
||||
## Features
|
||||
|
||||
This extension provides remote GitHub repository features for VS Code.
|
|
@ -0,0 +1,24 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
const path = require('path');
|
||||
const withDefaults = require('../shared.webpack.config');
|
||||
|
||||
module.exports = withDefaults({
|
||||
context: __dirname,
|
||||
target: 'webworker',
|
||||
node: false,
|
||||
entry: {
|
||||
extension: './src/extension.ts',
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'node-fetch': path.resolve(__dirname, 'node_modules/node-fetch/browser.js'),
|
||||
},
|
||||
}
|
||||
});
|
17
extensions/github-browser/extension.webpack.config.js
Normal file
17
extensions/github-browser/extension.webpack.config.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
|
||||
const withDefaults = require('../shared.webpack.config');
|
||||
|
||||
module.exports = withDefaults({
|
||||
context: __dirname,
|
||||
entry: {
|
||||
extension: './src/extension.ts'
|
||||
}
|
||||
});
|
51
extensions/github-browser/package.json
Normal file
51
extensions/github-browser/package.json
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "github-browser",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"publisher": "vscode",
|
||||
"version": "0.0.1",
|
||||
"engines": {
|
||||
"vscode": "^1.45.0"
|
||||
},
|
||||
"enableProposedApi": true,
|
||||
"private": true,
|
||||
"categories": [
|
||||
"Other"
|
||||
],
|
||||
"activationEvents": [
|
||||
"onFileSystem:github"
|
||||
],
|
||||
"browser": "./dist/extension.js",
|
||||
"main": "./out/extension.js",
|
||||
"contributes": {
|
||||
"resourceLabelFormatters": [
|
||||
{
|
||||
"scheme": "github",
|
||||
"authority": "*",
|
||||
"formatting": {
|
||||
"label": "${authority}${path}",
|
||||
"separator": "/",
|
||||
"workspaceSuffix": "GitHub"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:github-browser",
|
||||
"compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none",
|
||||
"watch": "gulp watch-extension:github-browser",
|
||||
"watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose",
|
||||
"vscode:prepublish": "npm run compile"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/graphql": "4.5.0",
|
||||
"@octokit/rest": "17.11.0",
|
||||
"fuzzysort": "1.1.4",
|
||||
"node-fetch": "2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node-fetch": "2.5.7",
|
||||
"webpack": "4.43.0",
|
||||
"webpack-cli": "3.3.11"
|
||||
}
|
||||
}
|
4
extensions/github-browser/package.nls.json
Normal file
4
extensions/github-browser/package.nls.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"displayName": "GitHub Browser",
|
||||
"description": "Remotely browse a GitHub repository"
|
||||
}
|
11
extensions/github-browser/src/extension.ts
Normal file
11
extensions/github-browser/src/extension.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { GitHubFS } from './githubfs';
|
||||
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
context.subscriptions.push(new GitHubFS());
|
||||
}
|
|
@ -32,6 +32,7 @@ import {
|
|||
import { Octokit } from '@octokit/rest';
|
||||
import { graphql } from '@octokit/graphql/';
|
||||
import * as fuzzySort from 'fuzzysort';
|
||||
import fetch from 'node-fetch';
|
||||
import { Iterables } from './iterables';
|
||||
|
||||
const emptyDisposable = { dispose: () => { /* noop */ } };
|
8
extensions/github-browser/src/typings/ref.d.ts
vendored
Normal file
8
extensions/github-browser/src/typings/ref.d.ts
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
|
||||
/// <reference path="../../../types/lib.textEncoder.d.ts" />
|
13
extensions/github-browser/tsconfig.json
Normal file
13
extensions/github-browser/tsconfig.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../shared.tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out",
|
||||
// "experimentalDecorators": true,
|
||||
// "typeRoots": [
|
||||
// "./node_modules/@types"
|
||||
// ]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
]
|
||||
}
|
2975
extensions/github-browser/yarn.lock
Normal file
2975
extensions/github-browser/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
3
extensions/vscode-web-playground/.gitignore
vendored
3
extensions/vscode-web-playground/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
dist
|
||||
out
|
||||
node_modules
|
||||
node_modules
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
.vscode/**
|
||||
build/**
|
||||
dist/**
|
||||
out/**
|
||||
src/**
|
||||
typings/**
|
||||
**/*.ts
|
||||
**/*.map
|
||||
.gitignore
|
||||
extension-browser.webpack.config.js
|
||||
extension.webpack.config.js
|
||||
tsconfig.json
|
||||
yarn.lock
|
||||
|
|
|
@ -15,10 +15,5 @@ module.exports = withDefaults({
|
|||
node: false,
|
||||
entry: {
|
||||
extension: './src/extension.ts',
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'node-fetch': path.resolve(__dirname, 'node_modules/node-fetch/browser.js'),
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
|
@ -4,36 +4,14 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
/** @typedef {import('webpack').Configuration} WebpackConfig **/
|
||||
|
||||
'use strict';
|
||||
const path = require('path');
|
||||
|
||||
const withDefaults = require('../shared.webpack.config');
|
||||
|
||||
module.exports = function (env, argv) {
|
||||
const mode = argv.mode;
|
||||
|
||||
/**@type WebpackConfig*/
|
||||
const config = {
|
||||
context: __dirname,
|
||||
target: 'webworker',
|
||||
node: false,
|
||||
resolve: {
|
||||
alias: {
|
||||
'node-fetch': path.resolve(__dirname, 'node_modules/node-fetch/browser.js'),
|
||||
},
|
||||
},
|
||||
entry: {
|
||||
extension: './src/extension.ts',
|
||||
},
|
||||
};
|
||||
|
||||
if (mode === 'none') {
|
||||
// Set the output to `out` when there is no mode (e.g. not production)
|
||||
config.output = {
|
||||
path: path.join(__dirname, 'out'),
|
||||
};
|
||||
module.exports = withDefaults({
|
||||
context: __dirname,
|
||||
entry: {
|
||||
extension: './src/extension.ts'
|
||||
}
|
||||
|
||||
return withDefaults(config);
|
||||
};
|
||||
});
|
||||
|
|
|
@ -99,16 +99,9 @@
|
|||
"watch-web": "npx webpack-cli --config extension.webpack.config --mode none --watch --info-verbosity verbose",
|
||||
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-web-playground ./tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/graphql": "4.5.0",
|
||||
"@octokit/rest": "17.9.2",
|
||||
"fuzzysort": "1.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "2.2.43",
|
||||
"mocha-junit-reporter": "^1.17.0",
|
||||
"mocha-multi-reporters": "^1.1.7",
|
||||
"webpack": "4.43.0",
|
||||
"webpack-cli": "3.3.11"
|
||||
"mocha-multi-reporters": "^1.1.7"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
//
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { GitHubFS } from './githubfs';
|
||||
import { MemFS } from './memfs';
|
||||
|
||||
declare const window: unknown;
|
||||
|
@ -36,7 +35,6 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
function enableFs(context: vscode.ExtensionContext): MemFS {
|
||||
const memFs = new MemFS();
|
||||
context.subscriptions.push(memFs);
|
||||
context.subscriptions.push(new GitHubFS());
|
||||
|
||||
return memFs;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue