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

adds devcontainer.json for Codespaces and container use #428

Merged
merged 4 commits into from
Dec 10, 2024
Merged
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
65 changes: 65 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "NHS Prototype Kit",
"image": "mcr.microsoft.com/devcontainers/universal:2",
// codespaces seems to have an issue using port 2000 so setting to 2001 for the NHS Prototype Kit
"runArgs": ["--env", "PORT=2001"],
frankieroberto marked this conversation as resolved.
Show resolved Hide resolved
"portsAttributes": {
"3001": {
"label": "Running prototype",
// --------------------------------
// onAutoForward possible options
// --------------------------------
// you can change the value to one of the following possible options:
// 'notify' (shows a prompt),
// 'silent' (does nothing)
// 'openBrowser' (opens the prototype URL in a browser window/tab)
// 'openPrview' (opens the codespaces preview window to present the running prototype to the user)
"onAutoForward": "openPreview"
}
},
// forward the port for the browersync process
"forwardPorts": [3001],
"otherPortsAttributes": { "onAutoForward": "ignore" },
// when created - sets the git merge statergy to rebase to hopefully make easier time of merging
"onCreateCommand": "git config --global pull.rebase true",
// after creation - installs the node packages
"postCreateCommand": "npm install",
// A command to run each time a tool has successfully attached to the container
"postAttachCommand": {
"server": "npm run watch"
},
// codespace customisations
"customizations": {
// Configure properties specific to VS Code web-basde IDE used within codespaces.
"vscode": {
// editor settings
"settings": {
// uncomment the following lines to hide files not needed to update content
// "files.exclude": {
// "{docs,lib,linters,middleware,node_modules,public,tests,NHS111.Shared.Frontend}/": true,
// "*{CHANGELOG,CONTRIBUTING}.md": true,
// "app/{data,assets}/": true,
// "app/*.js": true,
// "*.{js,yml,json}": true,
// ".*": true,
// "LICENSE": true
// },
// make emmet work within nunjucks
"emmet.includeLanguages": {
"njk": "html",
"nunjucks": "html",
"erb": "html",
"jinja": "html",
"jinja-html": "html",
"markdown": "html"
},
"html.suggest.html5": true
},
// bundle the following editor extensions
"extensions": [
// nunjuck syntax highlighting
"douglaszaltron.nunjucks-vscode-extensionpack"
]
}
}
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Update default index page ([PR 423](https://github.com/nhsuk/nhsuk-prototype-kit/pull/423))
- Import task list component ([PR 437](https://github.com/nhsuk/nhsuk-prototype-kit/pull/437))
- The example page templates have moved from the `docs` folder to `lib/example-templates` - ([PR 409](https://github.com/nhsuk/nhsuk-prototype-kit/pull/409))
- Added a devcontainer.json file to configure Github Codespaces for use of the kit ([PR 428])(https://github.com/nhsuk/nhsuk-prototype-kit/pull/428))


## 5.1.0 - 12 November 2024
Expand Down
Loading