-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea | ||
.DS_Store | ||
node_modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM gitpod/openvscode-server:latest | ||
|
||
ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server" | ||
ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server" | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
RUN \ | ||
# Direct download links to external .vsix not available on https://open-vsx.org/ | ||
# The two links here are just used as example, they are actually available on https://open-vsx.org/ | ||
urls=(\ | ||
https://github.com/hatchways/live-interviewing/releases/download/v0.0.1/vscode-extension/hatchways-0.0.1.vsix \ | ||
)\ | ||
# Create a tmp dir for downloading | ||
&& tdir=/tmp/exts && mkdir -p "${tdir}" && cd "${tdir}" \ | ||
# Download via wget from $urls array. | ||
&& wget "${urls[@]}" && \ | ||
# List the extensions in this array | ||
exts=(\ | ||
# From filesystem, .vsix that we downloaded (using bash wildcard '*') | ||
"${tdir}"/* \ | ||
)\ | ||
# Install the $exts | ||
&& for ext in "${exts[@]}"; do ${OPENVSCODE} --install-extension "${ext}"; done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"@typescript-eslint/naming-convention": "warn", | ||
"@typescript-eslint/semi": "warn", | ||
"curly": "warn", | ||
"eqeqeq": "warn", | ||
"no-throw-literal": "warn", | ||
"semi": "off" | ||
}, | ||
"ignorePatterns": [ | ||
"out", | ||
"dist", | ||
"**/*.d.ts" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// 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", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/out/**/*.js" | ||
], | ||
"preLaunchTask": "${defaultBuildTask}" | ||
}, | ||
{ | ||
"name": "Extension Tests", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}", | ||
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/out/test/**/*.js" | ||
], | ||
"preLaunchTask": "${defaultBuildTask}" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
src/** | ||
.gitignore | ||
.yarnrc | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
**/.eslintrc.json | ||
**/*.map | ||
**/*.ts |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--ignore-engines true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Change Log | ||
|
||
All notable changes to the "hatchways" 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# hatchways README |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "hatchways", | ||
"displayName": "Hatchways", | ||
"description": "Extension to run the Hatchways Interviewing Platform", | ||
"version": "0.0.1", | ||
"engines": { | ||
"vscode": "^1.82.0" | ||
}, | ||
"categories": [ | ||
"Other" | ||
], | ||
"activationEvents": ["onStartupFinished"], | ||
"main": "./out/extension.js", | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "hatchways.helloWorld", | ||
"title": "Hello World" | ||
} | ||
] | ||
}, | ||
"scripts": { | ||
"vscode:prepublish": "yarn run compile", | ||
"compile": "tsc -p ./", | ||
"watch": "tsc -watch -p ./", | ||
"pretest": "yarn run compile && yarn run lint", | ||
"lint": "eslint src --ext ts", | ||
"test": "node ./out/test/runTest.js" | ||
}, | ||
"devDependencies": { | ||
"@types/vscode": "^1.82.0", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "16.x", | ||
"@typescript-eslint/eslint-plugin": "^6.4.1", | ||
"@typescript-eslint/parser": "^6.4.1", | ||
"eslint": "^8.47.0", | ||
"glob": "^10.3.3", | ||
"mocha": "^10.2.0", | ||
"typescript": "^5.1.6", | ||
"@vscode/test-electron": "^2.3.4" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// 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'; | ||
import { exec } from 'child_process'; | ||
|
||
|
||
// 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 "hatchways" 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 | ||
// 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 from Hatchways!'); | ||
|
||
// Let's determine the workspace folder (assuming a single-root workspace) | ||
let workspaceFolders = vscode.workspace.workspaceFolders; | ||
console.log(workspaceFolders); | ||
|
||
if (!workspaceFolders) { | ||
vscode.window.showErrorMessage('No folder or workspace opened.'); | ||
return; | ||
} | ||
|
||
let currentWorkspacePath = workspaceFolders[0].uri.fsPath; | ||
|
||
console.log(currentWorkspacePath); | ||
|
||
// Now, run npm install in that folder | ||
exec('npm install', { cwd: currentWorkspacePath }, (error, stdout, stderr) => { | ||
if (error) { | ||
console.error(`exec error: ${error}`); | ||
vscode.window.showErrorMessage(`Error running npm install: ${error.message}`); | ||
return; | ||
} | ||
|
||
vscode.window.showInformationMessage(`Ran NPM install ${stdout}`); | ||
}); | ||
|
||
|
||
vscode.window.createWebviewPanel('myTerminal', 'My Terminal', vscode.ViewColumn.One); | ||
|
||
|
||
} | ||
|
||
// This method is called when your extension is deactivated | ||
export function deactivate() {} |