Skip to content

Set up a codespace for toolkit#345

Open
BCerki wants to merge 21 commits intodevelopfrom
feat/codespace-setup
Open

Set up a codespace for toolkit#345
BCerki wants to merge 21 commits intodevelopfrom
feat/codespace-setup

Conversation

@BCerki
Copy link
Contributor

@BCerki BCerki commented Sep 27, 2021

Fixes # n/a (new feature)

Proposed Changes

Create a codespace for the toolkit. This PR includes:

  • creating a .devcontainer file with the boilerplate for typescript-node container
  • installing asdf and using it to install appropriate tool versions
  • installing node modules
  • installing python modules
  • installing pre-commit

You can check that the versions are correct by running <tool> --version in the codespaces terminal.

You can check that the app starts up by running the following in the codespaces terminal:

  • yarn llink
  • yarn build
  • yarn storybook:bcgov or yarn storybook:button

# [Optional] Uncomment if you want to install more global node packages
# RUN su node -c "npm install -g <your-package-list -here>"

RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1 --depth 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kriscooke, this is per the asdf docs, but the branch name could get stagnant (and actually already is, I think; their repo has a v0.9 branch now).

Copy link
Contributor

Choose a reason for hiding this comment

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

This is OK for now, but is a common issue across projects to keep in mind 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

their repo has a v0.9 branch now

When tracking new version releases of things, the definitive source would be the repo's releases list.

So if they have a v0.9 branch now, this would be where they're actively working on the next version. But it's not officially released (ie: ready to use) until that branch is merged to main with a git tag (version number) which will cause it to appear on the list of releases.

# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/typescript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version: 16, 14, 12
ARG VARIANT="16-buster"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should stick to LTS Node (14)?


"postCreateCommand": "yarn --dev",

"extensions": ["dbaeumer.vscode-eslint"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is admittedly silly and picky, but I'm a little surprised the formatter didn't remove extra blank lines in this file? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The formatter isn't added yet--that's in PR #346

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see - I keep getting confused by the developer experience, which is a bit self-referential. 💫
You're working on this PR while connecting to the remote contianer itself - so formatter didn't run, because the pre-commit hook isn't running yet, etc...

# 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>"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can probably remove the commented blocks above, since we won't be needing that functionality

@BCerki BCerki requested a review from kriscooke September 29, 2021 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants