Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Add Codespaces to the boilerplate #508

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "${localWorkspaceFolderBasename}",
"image": "mcr.microsoft.com/vscode/devcontainers/universal:linux",
"forwardPorts": [ 8888 ],
"portsAttributes": {
"8888": {
"label": "Development",
"onAutoForward": "notify"
}
},
"otherPortsAttributes": {
"onAutoForward": "silent"
},
"postCreateCommand": "sh ./.devcontainer/init-wp.sh"
}
4 changes: 4 additions & 0 deletions .devcontainer/init-wp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash
npm start
npx wp-env run cli "wp config set WP_HOME https://${CODESPACE_NAME}-8888.githubpreview.dev/"
npx wp-env run cli "wp config set WP_SITEURL https://${CODESPACE_NAME}-8888.githubpreview.dev/"
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"rules": {
"no-descending-specificity": null,
"selector-class-pattern": null,
"declaration-property-unit-whitelist": null,
"declaration-property-unit-whitelist": null
}
}
2 changes: 0 additions & 2 deletions .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
},
"env": {
"development": {
"port": 80,
"config": {
"WP_DEBUG": true,
"WP_ENVIRONMENT_TYPE": "development",
"LH_CURRENTLY_EDITING": "lhtbp"
}
Expand Down
Loading