Add dev container config

remove useless types
This commit is contained in:
DefectingCat
2022-08-09 02:52:02 +00:00
parent 005180fb99
commit 3109d5bcfc
4 changed files with 69 additions and 114 deletions

14
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
# [Optional] Uncomment if you want to install more global node packages
# RUN su node -c "npm install -g <your-package-list -here>"

View File

@ -0,0 +1,17 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
# Install tslint, typescript. eslint is installed by javascript image
ARG NODE_MODULES="tslint-to-eslint-config typescript"
COPY library-scripts/meta.env /usr/local/etc/vscode-dev-containers
RUN su node -c "umask 0002 && npm install -g ${NODE_MODULES}" \
&& npm cache clean --force > /dev/null 2>&1
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

View File

@ -0,0 +1,37 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/typescript-node
{
"name": "Node.js & TypeScript",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 18, 16, 14.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local on arm64/Apple Silicon.
"args": {
"VARIANT": "16-bullseye"
}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"git": "os-provided"
}
}

View File

@ -52,120 +52,7 @@ export interface GistsFile {
content?: string | undefined;
}
export enum GistsLanguage {
JavaScript = 'JavaScript',
PublicKey = 'Public Key',
TypeScript = 'TypeScript',
}
export enum GistsFileType {
ApplicationJavascript = 'application/javascript',
ApplicationPGPSignature = 'application/pgp-signature',
TextPlain = 'text/plain',
VideoMP2T = 'video/MP2T',
}
export interface GistsOwner {
login: GistsLogin;
id: number;
node_id: GistsNodeID;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: GistsFollowingURL;
gists_url: GistsURL;
starred_url: GistsStarredURL;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: GistsEventsURL;
received_events_url: string;
type: GistsOwnerType;
site_admin: boolean;
}
export enum GistsEventsURL {
HTTPSAPIGithubCOMUsersDefectingCatEventsPrivacy = 'https://api.github.com/users/DefectingCat/events{/privacy}',
}
export enum GistsFollowingURL {
HTTPSAPIGithubCOMUsersDefectingCatFollowingOtherUser = 'https://api.github.com/users/DefectingCat/following{/other_user}',
}
export enum GistsURL {
HTTPSAPIGithubCOMUsersDefectingCatGistsGistID = 'https://api.github.com/users/DefectingCat/gists{/gist_id}',
}
export enum GistsLogin {
DefectingCat = 'DefectingCat',
}
export enum GistsNodeID {
MDQ6VXNlcjI1MDMzNDkz = 'MDQ6VXNlcjI1MDMzNDkz',
}
export enum GistsStarredURL {
HTTPSAPIGithubCOMUsersDefectingCatStarredOwnerRepo = 'https://api.github.com/users/DefectingCat/starred{/owner}{/repo}',
}
export enum GistsOwnerType {
User = 'User',
}
// Generated by https://quicktype.io
export interface SignalGist extends GistData {
forks: any[];
history: History[];
}
// Generated by https://quicktype.io
export interface GithubUser {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
name: string;
company: null;
blog: string;
location: null;
email: string;
hireable: null;
bio: string;
twitter_username: string;
public_repos: number;
public_gists: number;
followers: number;
following: number;
created_at: string;
updated_at: string;
private_gists: number;
total_private_repos: number;
owned_private_repos: number;
disk_usage: number;
collaborators: number;
two_factor_authentication: boolean;
plan: Plan;
}
export interface Plan {
name: string;
space: number;
collaborators: number;
private_repos: number;
}
}