Skip to content

Add Dev Container #213

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

Open
wants to merge 3 commits into
base: main
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
9 changes: 9 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "solidos",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/node:1": {}
},
"postCreateCommand": "bash scripts/dev",
"forwardPorts": [3000]
}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ Before you start coding, please review our guidelines:

### SolidOS first time setup of code

Make sure you have the needed environment: [nvm for SolidOS](https://github.com/solidos/solidos/wiki/FAQs#setting-up-nvm-to-develop-for-solidos), npm, Node. If you have problems with node versions on the Apple M1 chip, in the [Troubleshooting SolidOS](https://github.com/solidos/solidos/wiki/Troubleshooting-SolidOS) you can find a solution.
If you use for instance VSCode, you can open this repository in its Dev Container.

If not, make sure you have the needed environment: [nvm for SolidOS](https://github.com/solidos/solidos/wiki/FAQs#setting-up-nvm-to-develop-for-solidos), npm, Node. If you have problems with node versions on the Apple M1 chip, in the [Troubleshooting SolidOS](https://github.com/solidos/solidos/wiki/Troubleshooting-SolidOS) you can find a solution.

```
git clone https://github.com/solidos/solidos
Expand Down
3 changes: 2 additions & 1 deletion scripts/add
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

FOLDER=$1
Expand Down Expand Up @@ -158,6 +158,7 @@ echo ">>>>> ADDING REPO - $GIT_URL to $FOLDER"
cd workspaces
git clone $GIT_URL $FOLDER
cd $FOLDER
nvm install
nvm use --delete-prefix
npm i
cd ../..
11 changes: 11 additions & 0 deletions scripts/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

unset PREFIX npm_config_prefix
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

nvm install
scripts/install
scripts/reset
echo Try something like: npm run watch-css
2 changes: 1 addition & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

nvm use --delete-prefix
Expand Down
2 changes: 1 addition & 1 deletion scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

function gitCheckoutMainOf {
Expand Down
2 changes: 1 addition & 1 deletion scripts/reset
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

nvm use --delete-prefix
Expand Down
2 changes: 1 addition & 1 deletion scripts/start
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

npx lerna bootstrap --force-local
Expand Down
2 changes: 1 addition & 1 deletion scripts/start-css
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

npx lerna bootstrap --force-local
Expand Down
2 changes: 1 addition & 1 deletion scripts/start-nss
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

npx lerna bootstrap --force-local
Expand Down
2 changes: 1 addition & 1 deletion scripts/switch-branch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

nvm use --delete-prefix
Expand Down
Empty file modified scripts/update-mashlib-repo.sh
100644 → 100755
Empty file.
Empty file modified scripts/update-solid-panes-repo.sh
100644 → 100755
Empty file.
Empty file modified scripts/update-this-panes-repo.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions scripts/watch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

nvm use --delete-prefix
Expand Down Expand Up @@ -38,7 +38,7 @@ do
fi
# command="echo '---' && pwd && echo '---'"

command=". $HOME/.nvm/nvm.sh; cd workspaces/$package; nvm use --delete-prefix; $command"
command=". $NVM_DIR/nvm.sh; cd workspaces/$package; nvm use --delete-prefix; $command"
packageCommands+=("$command")
done

Expand Down
4 changes: 2 additions & 2 deletions scripts/watch-css
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

unset PREFIX npm_config_prefix
export NVM_DIR="$HOME/.nvm"
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

nvm use --delete-prefix
Expand Down Expand Up @@ -35,7 +35,7 @@ do
fi
# command="echo '---' && pwd && echo '---'"

command=". $HOME/.nvm/nvm.sh; cd workspaces/$package; nvm use --delete-prefix; $command"
command=". $NVM_DIR/nvm.sh; cd workspaces/$package; nvm use --delete-prefix; $command"
packageCommands+=("$command")
done

Expand Down