-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed disabling extensions when debugging because it disables the remote extensions needed for debugging in a devcontainer.
- Loading branch information
Showing
7 changed files
with
192 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# The MIT License (MIT) | ||
# | ||
# Copyright (c) Heath Stewart | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-12 | ||
|
||
ARG DISPLAY=":1" | ||
ARG USERNAME="node" | ||
|
||
ENV DISPLAY="${DISPLAY}" \ | ||
EDITOR="nano" \ | ||
LANG="en_US.UTF-8" \ | ||
VISUAL="nano" | ||
|
||
RUN apt-get update \ | ||
&& export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libasound2 \ | ||
libgtk-3-0 \ | ||
libnss3 \ | ||
libsecret-1-dev \ | ||
libxss1 \ | ||
x11-utils \ | ||
x11-xserver-utils \ | ||
xvfb \ | ||
# | ||
# Clean up | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY bin/init.sh /usr/local/share/ | ||
|
||
RUN chmod +x /usr/local/share/init.sh | ||
|
||
ENTRYPOINT ["/usr/local/share/init.sh"] | ||
CMD ["sleep", "infinity"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# The MIT License (MIT) | ||
# | ||
# Copyright (c) Heath Stewart | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
log() { | ||
echo -e "[$(date) $@" | ||
} | ||
|
||
# Start Xvfb in the background for testing. | ||
if ! pidof Xvfb > /dev/null; then | ||
log "Starting Xvfb" | ||
/usr/bin/Xvfb ${DISPLAY:-:1} -ac >> /tmp/Xvfb.out 2>&1 & | ||
disown -ar | ||
log "Xvfb started" | ||
else | ||
log "Xvfb is already running" | ||
fi | ||
|
||
log "Executing: $@" | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "VSCode - Extension Development", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"overrideCommand": false, | ||
"runArgs": [ | ||
"--init", | ||
"--security-opt", "seccomp=unconfined" | ||
], | ||
"remoteUser": "node", | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
}, | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"editorconfig.editorconfig", | ||
"github.vscode-pull-request-github", | ||
"ms-vscode.vscode-typescript-tslint-plugin" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# The MIT License (MIT) | ||
# | ||
# Copyright (c) Heath Stewart | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
root = true | ||
|
||
[*] | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
|
||
[*.json] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-vscode.vscode-typescript-tslint-plugin" | ||
] | ||
} | ||
"dbaeumer.vscode-eslint", | ||
"editorconfig.editorconfig", | ||
"github.vscode-pull-request-github", | ||
"ms-vscode.vscode-typescript-tslint-plugin" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Contributing | ||
|
||
Contributions are welcome. | ||
|
||
All active development should target the `develop` branch. This is the configured default, but please make sure that all pull requests target `develop`. | ||
|
||
Backward compatibility of the user experience (UX) is important. This exstension was designed to be fast and simple - built right into users' workflow unlike the original "Insert GUID" that shipped with Visual Studio I sought to improve and replace. So any changes to bindings or menu order should be avoided unless the user has to opt into new behavior through, for example, changing settings to non-default values. | ||
|
||
Recommendations from .editorconfig and linting results should be respected, though there are few. | ||
|
||
Be sure to add an entry to the [CHANGELOG.md](CHANGELOG.md)! For bug fixes, please link to the original issue. | ||
|
||
## Prerequisites | ||
|
||
* [Node.js 12](https://nodejs.org) | ||
* (Recommended) [VSCode](https://code.visualstudio.com) | ||
|
||
## Building | ||
|
||
NPM should install everything required to build and test on Windows and macOS. Linux requires running X11 to test and debug, though you're welcome to open this project in a [devcontainer](https://code.visualstudio.com/docs/remote/containers) that will start the X virtual framebuffer (Xvfb) automatically. | ||
|
||
1. Install dependencies: | ||
```bash | ||
npm i | ||
``` | ||
2. Build: | ||
```bash | ||
npm run compile | ||
``` | ||
3. Run tests: | ||
```bash | ||
npm run test | ||
``` | ||
You can run and debug tests in VSCode by running **Launch Tests** in the **Run** (formerly **Debug**) view. | ||
|
||
## Versioning | ||
|
||
Versioning is done manually in the `develop` branch prior to a release by updating the package version in [package.json](package.json). Previously it was done automatically, but often times would skip a significant range of patch versions, which seems odd. |