Updated devcontainer and sample.json

This commit is contained in:
Hugo Bernier 2022-04-11 04:11:18 +00:00
parent c9ee9256ff
commit 633bb8d645
4 changed files with 20 additions and 14 deletions

View File

@ -1,7 +1,7 @@
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer // For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
{ {
"name": "SPFx 1.8.2", "name": "SPFx 1.14.0",
"image": "docker.io/m365pnp/spfx:1.8.2", "image": "docker.io/m365pnp/spfx:1.14.0",
// Set *default* container specific settings.json values on container create. // Set *default* container specific settings.json values on container create.
"settings": {}, "settings": {},
// Add the IDs of extensions you want installed when the container is created. // Add the IDs of extensions you want installed when the container is created.
@ -12,8 +12,7 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [ "forwardPorts": [
4321, 4321,
35729, 35729
5432
], ],
"portsAttributes": { "portsAttributes": {
"4321": { "4321": {
@ -22,11 +21,12 @@
"onAutoForward": "silent", "onAutoForward": "silent",
"requireLocalPort": true "requireLocalPort": true
}, },
"5432": { // Not needed for SPFx>= 1.12.1
"protocol": "https", // "5432": {
"label": "Workbench", // "protocol": "https",
"onAutoForward": "silent" // "label": "Workbench",
}, // "onAutoForward": "silent"
// },
"35729": { "35729": {
"protocol": "https", "protocol": "https",
"label": "LiveReload", "label": "LiveReload",

View File

@ -7,9 +7,11 @@ echo
echo -e "\e[1;94mGenerating dev certificate\e[0m" echo -e "\e[1;94mGenerating dev certificate\e[0m"
gulp trust-dev-cert gulp trust-dev-cert
# Convert the generated PEM certificate to a CER certificate
openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer
cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.cer # Copy the PEM ecrtificate for non-Windows hosts
cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.pem cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem
## add *.cer to .gitignore to prevent certificates from being saved in repo ## add *.cer to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.cer' ./.gitignore if ! grep -Fxq '*.cer' ./.gitignore

View File

@ -31,3 +31,7 @@ obj
# Styles Generated Code # Styles Generated Code
*.scss.ts *.scss.ts
# .CER Certificates
*.cer
# .PEM Certificates
*.pem

View File

@ -9,7 +9,7 @@
"The Web Part Birthdays shows the upcoming birthdays in the company, the web part reads birthdays from a list located on the tenant\u0027s root site with title \u0022Birthdays.\u0022" "The Web Part Birthdays shows the upcoming birthdays in the company, the web part reads birthdays from a list located on the tenant\u0027s root site with title \u0022Birthdays.\u0022"
], ],
"creationDateTime": "2019-07-23", "creationDateTime": "2019-07-23",
"updateDateTime": "2021-06-16", "updateDateTime": "2022-04-07",
"products": [ "products": [
"SharePoint" "SharePoint"
], ],
@ -20,7 +20,7 @@
}, },
{ {
"key": "SPFX-VERSION", "key": "SPFX-VERSION",
"value": "1.12.1" "value": "1.14.0"
}, },
{ {
"key": "SPFX-TEAMSTAB", "key": "SPFX-TEAMSTAB",