Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating dev container and vscode tasks #449

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "freyr-js-dev",
"image": "mcr.microsoft.com/devcontainers/javascript-node",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"postCreateCommand": {
"yarn install": "yarn global add freyr",
"install build tools": "sudo apt-get update && sudo apt install cmake -y"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never dealt with devcontainers before, but does it presuppose a debian-based environment? what if apt-get is unavailable?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea it is a debian container with some basic dependencies installed. The image details are here:
https://hub.docker.com/_/microsoft-devcontainers-javascript-node?tab=description

},
"postStartCommand": "git clone --branch 20210715.151551.e7ad03a --depth 1 https://github.com/wez/atomicparsley $HOME/atomicparsley && cmake -S $HOME/atomicparsley -B $HOME/atomicparsley && cmake --build $HOME/atomicparsley --config Release && sudo ln -s $HOME/atomicparsley/AtomicParsley /usr/bin/AtomicParsley"
}
53 changes: 53 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
// 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": "Spotify - Track",
"request": "launch",
"runtimeArgs": [
"test",
"spotify.track"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"outputCapture": "std",
"preLaunchTask": "npm: install"
},
{
"name": "Deezer - Artist",
"request": "launch",
"runtimeArgs": [
"test",
"deezer.artist"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"outputCapture": "std",
"preLaunchTask": "npm: install"
},
{
"name": "Apple Music - Album",
"request": "launch",
"runtimeArgs": [
"test",
"apple_music.album"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"outputCapture": "std",
"preLaunchTask": "npm: install"
},
]
}
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "install",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: install",
"detail": "install dependencies from package"
}
]
}