Skip to content
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
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ module.exports = {
'sourceType': 'module'
},
rules: {
// Require chunk names for dynamic imports in SPFx projects. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/import-requires-chunk-name': 1,
// Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/no-new-null': 1,
// Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin
Expand Down Expand Up @@ -295,9 +297,7 @@ module.exports = {
// ====================================================================
// @microsoft/eslint-plugin-spfx
// ====================================================================
'@microsoft/spfx/import-requires-chunk-name': 1,
'@microsoft/spfx/no-require-ensure': 2,
'@microsoft/spfx/pair-react-dom-render-unmount': 1
'@microsoft/spfx/no-require-ensure': 2
}
},
{
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ dist
lib
solution
temp
lib-dts
lib-commonjs
lib-esm
jest-output
*.sppkg

# Coverage directory used by tools like istanbul
Expand Down Expand Up @@ -49,3 +53,4 @@ release
*.scss.d.ts

.heft
.claude
5 changes: 3 additions & 2 deletions .yo-rc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"@microsoft/generator-sharepoint": {
"version": "1.21.1",
"version": "1.22.2",
"libraryName": "sp-dev-fx-controls-react",
"libraryId": "92b1e52c-a5fa-490a-bcf4-76080f39442c",
"environment": "spo",
"isDomainIsolated": false,
"isCreatingSolution": false,
"packageManager": "npm",
"plusBeta": false,
"nodeVersion": "18.17.1",
"nodeVersion": "22.22.0",
"useGulp": false,
"sdksVersions": {
"@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.24.0"
Expand Down
19 changes: 19 additions & 0 deletions config/heft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json",
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/heft.json",
"phasesByName": {
"version-updater": {
"tasksByName": {
"version-updater": {
"taskPlugin": {
"pluginPackage": "@rushstack/heft",
"pluginName": "run-script-plugin",
"options": {
"scriptPath": "./versionUpdater.mjs"
}
}
}
}
}
}
}
24 changes: 24 additions & 0 deletions config/jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/jest.config.json",

"setupFilesAfterEnv": [
"<rootDir>/tests/setupHeft.js"
],

"moduleNameMapper": {
"cheerio/lib/utils": "cheerio/utils",
"^undici$": "<rootDir>/tests/__mocks__/undici.js",
"@ms/sp-telemetry": "identity-obj-proxy",
"@microsoft/sp-webpart-base": "identity-obj-proxy",
"@microsoft/sp-core-library": "<rootDir>/tests/__mocks__/sp-core-library.js",
"@microsoft/sp-http": "<rootDir>/tests/__mocks__/sp-http.js",
"@microsoft/sp-application-base": "identity-obj-proxy",
"office-ui-fabric-react/lib/(.*)$": "office-ui-fabric-react/lib-commonjs/$1",
"@fluentui/react-theme-provider/lib/(.*)$": "@fluentui/react-theme-provider/lib-commonjs/$1",
"src/common/telemetry/(.*)$": "identity-obj-proxy",
"@pnp/sp": "identity-obj-proxy",
"'@pnp/sp/fields": "identity-obj-proxy",
"ControlStrings": "identity-obj-proxy",
"\\.(css|scss)$": "identity-obj-proxy"
}
}
7 changes: 7 additions & 0 deletions config/rig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// The "rig.json" file directs tools to look for their config files in an external package.
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",

"rigPackageName": "@microsoft/spfx-web-build-rig"
}
4 changes: 4 additions & 0 deletions config/sass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft-sass-plugin.schema.json",
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/sass.json"
}
9 changes: 9 additions & 0 deletions config/typescript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/typescript.json",

"staticAssetsToCopy": {
"fileExtensions": [".resx", ".jpg", ".png", ".woff", ".eot", ".ttf", ".svg", ".gif"],

"includeGlobs": ["webparts/*/loc/*.js"]
}
}
7 changes: 3 additions & 4 deletions docs/documentation/docs/guides/mpa.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ As this project is based on SPFx, it aligns with the following [development comp
- clone your fork
- in the command line, run the following commands:
- `npm install` to restore dependencies
- `npm install -g gulp-cli` in order to run `gulp` commands (run `npm list -g gulp-cli` to check if already installed on your machine or not)
- `gulp serve` to serve your project (or `npm run serve` if you want to use [`spfx-fast-serve`](https://github.com/s-KaiNet/spfx-fast-serve))
- `npm install -g @rushstack/heft` in order to run `heft` commands (run `npm list -g @rushstack/heft` to check if already installed on your machine or not)
- `npm run start` to serve your project
- Start making your changes

### Run the project locally
Expand All @@ -74,8 +74,7 @@ As this project embeds a SPFx solution, you have the ability to test all the con

You can also debug the controls in any supported language by running one of the following commands (for example in _french_):

- `gulp serve --locale=fr-fr`
- `npx fast-serve --locale=fr-fr` (if using `spfx-fast-serve`)
- `npm run start --locale=fr-fr`

Beware that both argument and value have to be lower case. Supported locales are listed in the following project's path: `src\loc`.

Expand Down
51 changes: 0 additions & 51 deletions gulpfile.js

This file was deleted.

Loading