Skip to content

Commit

Permalink
Merge pull request #5285 from petkir/spfx-upgrade/js-modern-calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoabernier authored Oct 12, 2024
2 parents 142210e + 045f10b commit 6376fbf
Show file tree
Hide file tree
Showing 23 changed files with 25,633 additions and 21,271 deletions.
38 changes: 38 additions & 0 deletions samples/js-modern-calendar/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "SPFx 1.20.0",
"image": "docker.io/m365pnp/spfx:1.20.0",
"customizations": {
"vscode": {
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
]
}
},
"forwardPorts": [
4321,
35729,
5432
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
"5432": {
"protocol": "https",
"label": "Workbench",
"onAutoForward": "silent"
},
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}
33 changes: 33 additions & 0 deletions samples/js-modern-calendar/.devcontainer/spfx-startup.sh
Original file line number Diff line number Diff line change
@@ -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**********"
5 changes: 5 additions & 0 deletions samples/js-modern-calendar/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require('@rushstack/eslint-config/patch/modern-module-resolution');
module.exports = {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/default'],
parserOptions: { tsconfigRootDir: __dirname }
};
3 changes: 3 additions & 0 deletions samples/js-modern-calendar/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ obj
*.cer
# .PEM Certificates
*.pem

.heft
release
16 changes: 16 additions & 0 deletions samples/js-modern-calendar/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!dist
config

gulpfile.js

release
src
temp

tsconfig.json
tslint.json

*.log

.yo-rc.json
.vscode
1 change: 1 addition & 0 deletions samples/js-modern-calendar/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.20.3
5 changes: 3 additions & 2 deletions samples/js-modern-calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ This is a modern web part built using the [SharePoint Framework](https://dev.off
| Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |

![SPFx 1.11](https://img.shields.io/badge/SPFx-1.11.0-green.svg)
![Node.js v10](https://img.shields.io/badge/Node.js-v10-green.svg)
![SPFx 1.20.0](https://img.shields.io/badge/SPFx-1.20.0-green.svg)
![Node.js v18](https://img.shields.io/badge/Node.js-v18-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
Expand Down Expand Up @@ -61,6 +61,7 @@ Version|Date|Comments
1.0.0.1|June 05, 2020|Updated the external CDN references to public CDN references
1.0.2.0|February 9, 2021|Upgraded to SPFx 1.11 and fixed issues with missing dependencies
1.0.3.0|October 28, 2021|fixed issues with Time zones. The Browser Time zone Settings are now used
1.0.4.0|October 05, 2024|Upgraded to SPFx 1.20 and fixed issues with dependencies eslint

## Minimal Path to Awesome

Expand Down
4 changes: 2 additions & 2 deletions samples/js-modern-calendar/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"This is a modern web part built on the GA version of the SharePoint Framework demonstrating how to build a custom web part with a calendar capabilities in it."
],
"creationDateTime": "2020-06-05",
"updateDateTime": "2021-10-28",
"updateDateTime": "2024-10-05",
"products": [
"SharePoint"
],
Expand All @@ -20,7 +20,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.11.0"
"value": "1.20.0"
}
],
"thumbnails": [
Expand Down
3 changes: 0 additions & 3 deletions samples/js-modern-calendar/config/copy-assets.json

This file was deleted.

7 changes: 4 additions & 3 deletions samples/js-modern-calendar/config/deploy-azure-storage.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"workingDir": "./temp/deploy/",
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
"account": "<!-- STORAGE ACCOUNT NAME -->",
"container": "document-card-web-part",
"accessKey": "<!-- ACCESS KEY -->"
"container": "react-organization-chart",
"accessKey": "<!-- ACCESS KEY -->",
"workingDir": "./release/assets/"
}
26 changes: 24 additions & 2 deletions samples/js-modern-calendar/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,37 @@
"solution": {
"name": "SPFx Modern Calendar",
"id": "3d593a2f-73f1-486f-9dae-555c6f6b584d",
"version": "1.0.3.0",
"version": "1.0.4.0",
"includeClientSideAssets": true,
"developer": {
"name": "",
"websiteUrl": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"mpnId": ""
}
},
"metadata": {
"shortDescription": {
"default": "modern-calendar description"
},
"longDescription": {
"default": "modern-calendar description"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
},
"features": [
{
"title": "modern-calendar ModernCalendarWebPart Feature",
"description": "The feature that activates ModernCalendarWebPart from the modern-calendar solution.",
"id": "c2a397d3-8c8f-47ab-b731-897178313c15",
"version": "1.0.4.0",
"componentIds": [
"c2a397d3-8c8f-47ab-b731-897178313c15"
]
}
]
},
"paths": {
"zippedPackage": "solution/modern-calendar.sppkg"
Expand Down
3 changes: 3 additions & 0 deletions samples/js-modern-calendar/config/sass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}
7 changes: 2 additions & 5 deletions samples/js-modern-calendar/config/serve.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
"port": 4321,
"initialPage": "https://localhost:5432/workbench",
"https": true,
"api": {
"port": 5432,
"entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
}
"initialPage": "https://{tenantDomain}/_layouts/workbench.aspx"
}
14 changes: 12 additions & 2 deletions samples/js-modern-calendar/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
'use strict';

const gulp = require('gulp');
const build = require('@microsoft/sp-build-web');

build.initialize(gulp);
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);

var getTasks = build.rig.getTasks;
build.rig.getTasks = function () {
var result = getTasks.call(build.rig);

result.set('serve', result.get('serve-deprecated'));

return result;
};

build.initialize(require('gulp'));
Loading

0 comments on commit 6376fbf

Please sign in to comment.