Added nvmrc, container, moved sample.json

This commit is contained in:
Hugo Bernier 2023-12-04 22:22:41 -05:00
parent e5628d0e61
commit 1c485c86ec
7 changed files with 209 additions and 61 deletions

View File

@ -0,0 +1,31 @@
{
"name": "SPFx 1.17.3",
"image": "docker.io/m365pnp/spfx:1.17.3",
"settings": {
},
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
],
"forwardPorts": [
4321,
35729
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}

View File

@ -0,0 +1,33 @@
echo
echo -e "\e[1;94mInstalling Node dependencies\e[0m"
npm install
## commands to create dev certificate and copy it to the root folder of the project
echo
echo -e "\e[1;94mGenerating dev certificate\e[0m"
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
# Copy the PEM ecrtificate for non-Windows hosts
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem
## add *.cer to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.cer' ./.gitignore
then
echo "# .CER Certificates" >> .gitignore
echo "*.cer" >> .gitignore
fi
## add *.pem to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.pem' ./.gitignore
then
echo "# .PEM Certificates" >> .gitignore
echo "*.pem" >> .gitignore
fi
echo
echo -e "\e[1;92mReady!\e[0m"
echo -e "\n\e[1;94m**********\nOptional: if you plan on using gulp serve, don't forget to add the container certificate to your local machine. Please visit https://aka.ms/spfx-devcontainer for more information\n**********"

View File

@ -0,0 +1 @@
v14.18.1

View File

@ -2,7 +2,7 @@
Sample web part to display advent calendar with configurable number of days and configurable content for each day.
![Twitter timeline](./assets/adventCalendar.png)
![Twitter timeline](./assets/adventCalendar.gif)
## Compatibility
@ -47,18 +47,25 @@ Version|Date|Comments
* edit a page
* add _Advent Calendar_ web part
## Help
We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
If you're having issues building the solution, please run [spfx doctor](https://pnp.github.io/cli-microsoft365/cmd/spfx/spfx-doctor/) from within the solution folder to diagnose incompatibility issues with your environment.
You can try looking at [issues related to this sample](https://github.com/pnp/sp-dev-fx-webparts/issues?q=label%3A%22sample%3A%20react-advent-calendar%22) to see if anybody else is having the same issues.
You can also try looking at [discussions related to this sample](https://github.com/pnp/sp-dev-fx-webparts/discussions?discussions_q=react-advent-calendar) and see what the community is saying.
If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-advent-calendar&template=bug-report.yml&sample=react-advent-calendar&authors=@YOURGITHUBUSERNAME&title=react-advent-calendar%20-%20).
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aquestion%2Csample%3A%20react-advent-calendar&template=question.yml&sample=react-advent-calendar&authors=@YOURGITHUBUSERNAME&title=react-advent-calendar%20-%20).
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-advent-calendar&template=suggestion.yml&sample=react-advent-calendar&authors=@YOURGITHUBUSERNAME&title=react-advent-calendar%20-%20).
## Disclaimer
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-webparts/samples/react-advent-calendar" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

View File

@ -0,0 +1,47 @@
[
{
"name": "pnp-sp-dev-spfx-web-parts-react-advent-calendar",
"source": "pnp",
"title": "Advent Calendar",
"shortDescription": "This project shows how to create an Advent Calendar using SPFx and React.",
"url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-advent-calendar",
"longDescription": [
"This project shows how to create an Advent Calendar using SPFx and React.",
],
"creationDateTime": "2023-12-01",
"updateDateTime": "2023-12-01",
"products": [
"SharePoint"
],
"metadata": [
{
"key": "SPFX-VERSION",
"value": "1.17.3"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-advent-calendar/assets/adventCalendar.gif",
"alt": "Tailwind CSS"
}
],
"authors": [
{
"gitHubAccount": "ValerasNarbutas",
"pictureUrl": "https://github.com/valerasnarbutas.png",
"name": "Valeras Narbutas",
"twitter": "ValerasNarbutas"
}
],
"references": [
{
"name": "Build your first SharePoint client-side web part",
"description": "Client-side web parts are client-side components that run in the context of a SharePoint page. Client-side web parts can be deployed to SharePoint environments that support the SharePoint Framework. You can also use modern JavaScript web frameworks, tools, and libraries to build them.",
"url": "https://learn.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part"
}
]
}
]

View File

@ -2284,23 +2284,6 @@
"loader-utils": "1.4.2"
}
},
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@microsoft/rush-lib": {
"version": "5.93.1",
"resolved": "https://registry.npmjs.org/@microsoft/rush-lib/-/rush-lib-5.93.1.tgz",
@ -2960,6 +2943,25 @@
"@microsoft/sp-http-base": "1.17.3",
"@microsoft/sp-http-msgraph": "1.17.3",
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
}
}
},
"@microsoft/sp-http-base": {
@ -2977,6 +2979,44 @@
"msalBrowserLegacy": "npm:@azure/msal-browser@2.22.0",
"msalLegacy": "npm:msal@1.4.12",
"tslib": "2.3.1"
},
"dependencies": {
"@azure/msal-common": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-6.4.0.tgz",
"integrity": "sha512-WZdgq9f9O8cbxGzdRwLLMM5xjmLJ2mdtuzgXeiGxIRkVVlJ9nZ6sWnDFKa2TX8j72UXD1IfL0p/RYNoTXYoGfg=="
},
"@microsoft/teams-js-v2": {
"version": "npm:@microsoft/teams-js@2.9.1",
"resolved": "https://registry.npmjs.org/@microsoft/teams-js/-/teams-js-2.9.1.tgz",
"integrity": "sha512-+ch8SVKIkZB4anZF05oEbvcyRcEzIVlRlzh5jSxsJ3HjOrJBd1lgfxqz6pkaAEFsAaTBSLkdziN4qtwVp72Gww==",
"requires": {
"debug": "^4.3.3"
}
},
"msalBrowserLegacy": {
"version": "npm:@azure/msal-browser@2.22.0",
"resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.22.0.tgz",
"integrity": "sha512-ZpnbnzjYGRGHjWDPOLjSp47CQvhK927+W9avtLoNNCMudqs2dBfwj76lnJwObDE7TAKmCUueTiieglBiPb1mgQ==",
"requires": {
"@azure/msal-common": "^6.1.0"
}
},
"msalLegacy": {
"version": "npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
}
}
},
"@microsoft/sp-http-msgraph": {
@ -2990,6 +3030,25 @@
"@microsoft/sp-http-base": "1.17.3",
"@microsoft/sp-loader": "1.17.3",
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
}
}
},
"@microsoft/sp-image-helper": {
@ -3342,6 +3401,14 @@
"@fluentui/utilities": "^8.13.21",
"tslib": "^2.1.0"
}
},
"@microsoft/teams-js-v2": {
"version": "npm:@microsoft/teams-js@2.9.1",
"resolved": "https://registry.npmjs.org/@microsoft/teams-js/-/teams-js-2.9.1.tgz",
"integrity": "sha512-+ch8SVKIkZB4anZF05oEbvcyRcEzIVlRlzh5jSxsJ3HjOrJBd1lgfxqz6pkaAEFsAaTBSLkdziN4qtwVp72Gww==",
"requires": {
"debug": "^4.3.3"
}
}
}
},
@ -3816,14 +3883,6 @@
}
}
},
"@microsoft/teams-js-v2": {
"version": "npm:@microsoft/teams-js@2.9.1",
"resolved": "https://registry.npmjs.org/@microsoft/teams-js/-/teams-js-2.9.1.tgz",
"integrity": "sha512-+ch8SVKIkZB4anZF05oEbvcyRcEzIVlRlzh5jSxsJ3HjOrJBd1lgfxqz6pkaAEFsAaTBSLkdziN4qtwVp72Gww==",
"requires": {
"debug": "^4.3.3"
}
},
"@microsoft/tsdoc": {
"version": "0.14.2",
"resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz",
@ -15709,36 +15768,6 @@
}
}
},
"msalBrowserLegacy": {
"version": "npm:@azure/msal-browser@2.22.0",
"resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.22.0.tgz",
"integrity": "sha512-ZpnbnzjYGRGHjWDPOLjSp47CQvhK927+W9avtLoNNCMudqs2dBfwj76lnJwObDE7TAKmCUueTiieglBiPb1mgQ==",
"requires": {
"@azure/msal-common": "^6.1.0"
},
"dependencies": {
"@azure/msal-common": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-6.4.0.tgz",
"integrity": "sha512-WZdgq9f9O8cbxGzdRwLLMM5xjmLJ2mdtuzgXeiGxIRkVVlJ9nZ6sWnDFKa2TX8j72UXD1IfL0p/RYNoTXYoGfg=="
}
}
},
"msalLegacy": {
"version": "npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"multicast-dns": {
"version": "7.2.5",
"resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",