Skip to content

Commit d4d64c9

Browse files
committed
adding welcome message
1 parent dce4f1e commit d4d64c9

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"remoteEnv": {
1212
"PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/node_modules/.bin"
1313
},
14-
"postCreateCommand": "npm ci --ignore-scripts",
14+
"postCreateCommand": "npm ci --ignore-scripts && WELCOME_SOURCE=\"source \\\"$PWD/.devcontainer/welcome.sh\\\"\" && (grep -qxF \"$WELCOME_SOURCE\" ~/.bashrc || echo \"$WELCOME_SOURCE\" >> ~/.bashrc) && mkdir -p ~/.config/vscode-dev-containers && touch ~/.config/vscode-dev-containers/first-run-notice-already-displayed",
1515
"customizations": {
1616
"vscode": {
1717
"settings": {
@@ -22,7 +22,9 @@
2222
"eslint.format.enable": true,
2323
"eslint.validate": ["typescript", "typescriptreact"],
2424
"js/ts.tsdk.path": "node_modules/typescript/lib",
25-
"js/ts.tsdk.promptToUseWorkspaceVersion": true
25+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
26+
"extensions.ignoreRecommendations": true,
27+
"extensions.showRecommendationsOnInstall": false
2628
},
2729
"extensions": [
2830
"dbaeumer.vscode-eslint",

.devcontainer/welcome.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
3+
# Only print the banner in interactive terminals.
4+
if [[ $- != *i* ]]; then
5+
return
6+
fi
7+
8+
WELCOME_MARKER_FILE="$HOME/.config/apiops-cli/welcome-shown"
9+
10+
# Print only once per container/user lifecycle.
11+
if [[ -f "$WELCOME_MARKER_FILE" ]]; then
12+
return
13+
fi
14+
15+
mkdir -p "$HOME/.config/apiops-cli"
16+
touch "$WELCOME_MARKER_FILE"
17+
18+
printf "👋 Welcome to apiops-cli!\n\n"
19+
printf "📚 To get started, run:\n"
20+
printf " npm ci && npm run build\n\n"

0 commit comments

Comments
 (0)