├── .gitignore ├── 01-intro.pptx ├── 02-dev-tools.pptx ├── 03-using.pptx ├── Demos ├── 01-appcatalog │ └── README.md ├── 02-setup-env │ └── README.md ├── 03-webpart │ ├── .eslintrc.js │ ├── .gitignore │ ├── .npmignore │ ├── .vscode │ │ ├── launch.json │ │ └── settings.json │ ├── .yo-rc.json │ ├── README.md │ ├── config │ │ ├── config.json │ │ ├── deploy-azure-storage.json │ │ ├── package-solution.json │ │ ├── sass.json │ │ ├── serve.json │ │ └── write-manifests.json │ ├── gulpfile.js │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── webparts │ │ │ └── helloWorld │ │ │ ├── HelloWorldWebPart.manifest.json │ │ │ ├── HelloWorldWebPart.module.scss │ │ │ ├── HelloWorldWebPart.ts │ │ │ ├── assets │ │ │ ├── welcome-dark.png │ │ │ └── welcome-light.png │ │ │ └── loc │ │ │ ├── en-us.js │ │ │ └── mystrings.d.ts │ ├── teams │ │ ├── 4f305338-fac1-4515-b720-5d606f2b5d45_color.png │ │ └── 4f305338-fac1-4515-b720-5d606f2b5d45_outline.png │ └── tsconfig.json └── README.md ├── LICENSE ├── README.md └── SECURITY.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | .DS_Store -------------------------------------------------------------------------------- /01-intro.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SharePoint/sp-dev-training-spfx-getting-started/9871638592d713c8d52108b00d10bdd896242b3b/01-intro.pptx -------------------------------------------------------------------------------- /02-dev-tools.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SharePoint/sp-dev-training-spfx-getting-started/9871638592d713c8d52108b00d10bdd896242b3b/02-dev-tools.pptx -------------------------------------------------------------------------------- /03-using.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SharePoint/sp-dev-training-spfx-getting-started/9871638592d713c8d52108b00d10bdd896242b3b/03-using.pptx -------------------------------------------------------------------------------- /Demos/01-appcatalog/README.md: -------------------------------------------------------------------------------- 1 | # DEMO: Create and Configure your SharePoint Online Developer Tenant 2 | 3 | This completed project is the result of the lab exercise **Create and Configure your SharePoint Online Developer Tenant** that is referenced in the [README](../../README.md) in this repo. 4 | 5 | ## Prerequisites 6 | 7 | - [Microsoft 365 tenant](https://developer.microsoft.com/en-us/microsoft-365/dev-program?ocid=MSlearn) 8 | 9 | ## Instructions 10 | 11 | - Follow the instructions in the associated lab exercise's steps to install and test the project. 12 | -------------------------------------------------------------------------------- /Demos/02-setup-env/README.md: -------------------------------------------------------------------------------- 1 | # DEMO: Configure your SharePoint Framework development environment 2 | 3 | This completed project is the result of the lab exercise **Configure your SharePoint Framework development environment** that is referenced in the [README](../../README.md) in this repo. 4 | 5 | ## Prerequisites 6 | 7 | - [Microsoft 365 tenant](https://developer.microsoft.com/en-us/microsoft-365/dev-program?ocid=MSlearn) 8 | - [Visual Studio Code](https://code.visualstudio.com/) 9 | 10 | ## Instructions 11 | 12 | - Follow the instructions in the associated lab exercise's steps to install and test the project. 13 | -------------------------------------------------------------------------------- /Demos/03-webpart/.eslintrc.js: -------------------------------------------------------------------------------- 1 | require('@rushstack/eslint-config/patch/modern-module-resolution'); 2 | module.exports = { 3 | extends: ['@microsoft/eslint-config-spfx/lib/profiles/default'], 4 | parserOptions: { tsconfigRootDir: __dirname }, 5 | overrides: [ 6 | { 7 | files: ['*.ts', '*.tsx'], 8 | parser: '@typescript-eslint/parser', 9 | 'parserOptions': { 10 | 'project': './tsconfig.json', 11 | 'ecmaVersion': 2018, 12 | 'sourceType': 'module' 13 | }, 14 | rules: { 15 | // 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 16 | '@rushstack/no-new-null': 1, 17 | // Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin 18 | '@rushstack/hoist-jest-mock': 1, 19 | // Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security 20 | '@rushstack/security/no-unsafe-regexp': 1, 21 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 22 | '@typescript-eslint/adjacent-overload-signatures': 1, 23 | // RATIONALE: Code is more readable when the type of every variable is immediately obvious. 24 | // Even if the compiler may be able to infer a type, this inference will be unavailable 25 | // to a person who is reviewing a GitHub diff. This rule makes writing code harder, 26 | // but writing code is a much less important activity than reading it. 27 | // 28 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 29 | '@typescript-eslint/explicit-function-return-type': [ 30 | 1, 31 | { 32 | 'allowExpressions': true, 33 | 'allowTypedFunctionExpressions': true, 34 | 'allowHigherOrderFunctions': false 35 | } 36 | ], 37 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 38 | // Rationale to disable: although this is a recommended rule, it is up to dev to select coding style. 39 | // Set to 1 (warning) or 2 (error) to enable. 40 | '@typescript-eslint/explicit-member-accessibility': 0, 41 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 42 | '@typescript-eslint/no-array-constructor': 1, 43 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 44 | // 45 | // RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript. 46 | // This rule should be suppressed only in very special cases such as JSON.stringify() 47 | // where the type really can be anything. Even if the type is flexible, another type 48 | // may be more appropriate such as "unknown", "{}", or "Record". 49 | '@typescript-eslint/no-explicit-any': 1, 50 | // RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch() 51 | // handler. Thus wherever a Promise arises, the code must either append a catch handler, 52 | // or else return the object to a caller (who assumes this responsibility). Unterminated 53 | // promise chains are a serious issue. Besides causing errors to be silently ignored, 54 | // they can also cause a NodeJS process to terminate unexpectedly. 55 | '@typescript-eslint/no-floating-promises': 2, 56 | // RATIONALE: Catches a common coding mistake. 57 | '@typescript-eslint/no-for-in-array': 2, 58 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 59 | '@typescript-eslint/no-misused-new': 2, 60 | // RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks 61 | // a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler 62 | // optimizations. If you are declaring loose functions/variables, it's better to make them 63 | // static members of a class, since classes support property getters and their private 64 | // members are accessible by unit tests. Also, the exercise of choosing a meaningful 65 | // class name tends to produce more discoverable APIs: for example, search+replacing 66 | // the function "reverse()" is likely to return many false matches, whereas if we always 67 | // write "Text.reverse()" is more unique. For large scale organization, it's recommended 68 | // to decompose your code into separate NPM packages, which ensures that component 69 | // dependencies are tracked more conscientiously. 70 | // 71 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 72 | '@typescript-eslint/no-namespace': [ 73 | 1, 74 | { 75 | 'allowDeclarations': false, 76 | 'allowDefinitionFiles': false 77 | } 78 | ], 79 | // RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)" 80 | // that avoids the effort of declaring "title" as a field. This TypeScript feature makes 81 | // code easier to write, but arguably sacrifices readability: In the notes for 82 | // "@typescript-eslint/member-ordering" we pointed out that fields are central to 83 | // a class's design, so we wouldn't want to bury them in a constructor signature 84 | // just to save some typing. 85 | // 86 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 87 | // Set to 1 (warning) or 2 (error) to enable the rule 88 | '@typescript-eslint/parameter-properties': 0, 89 | // RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code 90 | // may impact performance. 91 | // 92 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 93 | '@typescript-eslint/no-unused-vars': [ 94 | 1, 95 | { 96 | 'vars': 'all', 97 | // Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code, 98 | // the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures 99 | // that are overriding a base class method or implementing an interface. 100 | 'args': 'none' 101 | } 102 | ], 103 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 104 | '@typescript-eslint/no-use-before-define': [ 105 | 2, 106 | { 107 | 'functions': false, 108 | 'classes': true, 109 | 'variables': true, 110 | 'enums': true, 111 | 'typedefs': true 112 | } 113 | ], 114 | // Disallows require statements except in import statements. 115 | // In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports. 116 | '@typescript-eslint/no-var-requires': 'error', 117 | // RATIONALE: The "module" keyword is deprecated except when describing legacy libraries. 118 | // 119 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 120 | '@typescript-eslint/prefer-namespace-keyword': 1, 121 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 122 | // Rationale to disable: it's up to developer to decide if he wants to add type annotations 123 | // Set to 1 (warning) or 2 (error) to enable the rule 124 | '@typescript-eslint/no-inferrable-types': 0, 125 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 126 | // Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios 127 | '@typescript-eslint/no-empty-interface': 0, 128 | // RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake. 129 | 'accessor-pairs': 1, 130 | // RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking. 131 | 'dot-notation': [ 132 | 1, 133 | { 134 | 'allowPattern': '^_' 135 | } 136 | ], 137 | // RATIONALE: Catches code that is likely to be incorrect 138 | 'eqeqeq': 1, 139 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 140 | 'for-direction': 1, 141 | // RATIONALE: Catches a common coding mistake. 142 | 'guard-for-in': 2, 143 | // RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time 144 | // to split up your code. 145 | 'max-lines': ['warn', { max: 2000 }], 146 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 147 | 'no-async-promise-executor': 2, 148 | // RATIONALE: Deprecated language feature. 149 | 'no-caller': 2, 150 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 151 | 'no-compare-neg-zero': 2, 152 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 153 | 'no-cond-assign': 2, 154 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 155 | 'no-constant-condition': 1, 156 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 157 | 'no-control-regex': 2, 158 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 159 | 'no-debugger': 1, 160 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 161 | 'no-delete-var': 2, 162 | // RATIONALE: Catches code that is likely to be incorrect 163 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 164 | 'no-duplicate-case': 2, 165 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 166 | 'no-empty': 1, 167 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 168 | 'no-empty-character-class': 2, 169 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 170 | 'no-empty-pattern': 1, 171 | // RATIONALE: Eval is a security concern and a performance concern. 172 | 'no-eval': 1, 173 | // RATIONALE: Catches code that is likely to be incorrect 174 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 175 | 'no-ex-assign': 2, 176 | // RATIONALE: System types are global and should not be tampered with in a scalable code base. 177 | // If two different libraries (or two versions of the same library) both try to modify 178 | // a type, only one of them can win. Polyfills are acceptable because they implement 179 | // a standardized interoperable contract, but polyfills are generally coded in plain 180 | // JavaScript. 181 | 'no-extend-native': 1, 182 | // Disallow unnecessary labels 183 | 'no-extra-label': 1, 184 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 185 | 'no-fallthrough': 2, 186 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 187 | 'no-func-assign': 1, 188 | // RATIONALE: Catches a common coding mistake. 189 | 'no-implied-eval': 2, 190 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 191 | 'no-invalid-regexp': 2, 192 | // RATIONALE: Catches a common coding mistake. 193 | 'no-label-var': 2, 194 | // RATIONALE: Eliminates redundant code. 195 | 'no-lone-blocks': 1, 196 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 197 | 'no-misleading-character-class': 2, 198 | // RATIONALE: Catches a common coding mistake. 199 | 'no-multi-str': 2, 200 | // RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to 201 | // a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()", 202 | // or else implies that the constructor is doing nontrivial computations, which is often 203 | // a poor class design. 204 | 'no-new': 1, 205 | // RATIONALE: Obsolete language feature that is deprecated. 206 | 'no-new-func': 2, 207 | // RATIONALE: Obsolete language feature that is deprecated. 208 | 'no-new-object': 2, 209 | // RATIONALE: Obsolete notation. 210 | 'no-new-wrappers': 1, 211 | // RATIONALE: Catches code that is likely to be incorrect 212 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 213 | 'no-octal': 2, 214 | // RATIONALE: Catches code that is likely to be incorrect 215 | 'no-octal-escape': 2, 216 | // RATIONALE: Catches code that is likely to be incorrect 217 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 218 | 'no-regex-spaces': 2, 219 | // RATIONALE: Catches a common coding mistake. 220 | 'no-return-assign': 2, 221 | // RATIONALE: Security risk. 222 | 'no-script-url': 1, 223 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 224 | 'no-self-assign': 2, 225 | // RATIONALE: Catches a common coding mistake. 226 | 'no-self-compare': 2, 227 | // RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use 228 | // commas to create compound expressions. In general code is more readable if each 229 | // step is split onto a separate line. This also makes it easier to set breakpoints 230 | // in the debugger. 231 | 'no-sequences': 1, 232 | // RATIONALE: Catches code that is likely to be incorrect 233 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 234 | 'no-shadow-restricted-names': 2, 235 | // RATIONALE: Obsolete language feature that is deprecated. 236 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 237 | 'no-sparse-arrays': 2, 238 | // RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception, 239 | // such flexibility adds pointless complexity, by requiring every catch block to test 240 | // the type of the object that it receives. Whereas if catch blocks can always assume 241 | // that their object implements the "Error" contract, then the code is simpler, and 242 | // we generally get useful additional information like a call stack. 243 | 'no-throw-literal': 2, 244 | // RATIONALE: Catches a common coding mistake. 245 | 'no-unmodified-loop-condition': 1, 246 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 247 | 'no-unsafe-finally': 2, 248 | // RATIONALE: Catches a common coding mistake. 249 | 'no-unused-expressions': 1, 250 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 251 | 'no-unused-labels': 1, 252 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 253 | 'no-useless-catch': 1, 254 | // RATIONALE: Avoids a potential performance problem. 255 | 'no-useless-concat': 1, 256 | // RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior. 257 | // Always use "let" or "const" instead. 258 | // 259 | // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json 260 | 'no-var': 2, 261 | // RATIONALE: Generally not needed in modern code. 262 | 'no-void': 1, 263 | // RATIONALE: Obsolete language feature that is deprecated. 264 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 265 | 'no-with': 2, 266 | // RATIONALE: Makes logic easier to understand, since constants always have a known value 267 | // @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js 268 | 'prefer-const': 1, 269 | // RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused. 270 | 'promise/param-names': 2, 271 | // RATIONALE: Catches code that is likely to be incorrect 272 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 273 | 'require-atomic-updates': 2, 274 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 275 | 'require-yield': 1, 276 | // "Use strict" is redundant when using the TypeScript compiler. 277 | 'strict': [ 278 | 2, 279 | 'never' 280 | ], 281 | // RATIONALE: Catches code that is likely to be incorrect 282 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 283 | 'use-isnan': 2, 284 | // STANDARDIZED BY: eslint\conf\eslint-recommended.js 285 | // Set to 1 (warning) or 2 (error) to enable. 286 | // Rationale to disable: !!{} 287 | 'no-extra-boolean-cast': 0, 288 | // ==================================================================== 289 | // @microsoft/eslint-plugin-spfx 290 | // ==================================================================== 291 | '@microsoft/spfx/import-requires-chunk-name': 1, 292 | '@microsoft/spfx/no-require-ensure': 2, 293 | '@microsoft/spfx/pair-react-dom-render-unmount': 1 294 | } 295 | }, 296 | { 297 | // For unit tests, we can be a little bit less strict. The settings below revise the 298 | // defaults specified in the extended configurations, as well as above. 299 | files: [ 300 | // Test files 301 | '*.test.ts', 302 | '*.test.tsx', 303 | '*.spec.ts', 304 | '*.spec.tsx', 305 | 306 | // Facebook convention 307 | '**/__mocks__/*.ts', 308 | '**/__mocks__/*.tsx', 309 | '**/__tests__/*.ts', 310 | '**/__tests__/*.tsx', 311 | 312 | // Microsoft convention 313 | '**/test/*.ts', 314 | '**/test/*.tsx' 315 | ], 316 | rules: {} 317 | } 318 | ] 319 | }; -------------------------------------------------------------------------------- /Demos/03-webpart/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Dependency directories 7 | node_modules 8 | 9 | # Build generated files 10 | dist 11 | lib 12 | release 13 | solution 14 | temp 15 | *.sppkg 16 | .heft 17 | 18 | # Coverage directory used by tools like istanbul 19 | coverage 20 | 21 | # OSX 22 | .DS_Store 23 | 24 | # Visual Studio files 25 | .ntvs_analysis.dat 26 | .vs 27 | bin 28 | obj 29 | 30 | # Resx Generated Code 31 | *.resx.ts 32 | 33 | # Styles Generated Code 34 | *.scss.ts 35 | -------------------------------------------------------------------------------- /Demos/03-webpart/.npmignore: -------------------------------------------------------------------------------- 1 | !dist 2 | config 3 | 4 | gulpfile.js 5 | 6 | release 7 | src 8 | temp 9 | 10 | tsconfig.json 11 | tslint.json 12 | 13 | *.log 14 | 15 | .yo-rc.json 16 | .vscode 17 | -------------------------------------------------------------------------------- /Demos/03-webpart/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Hosted workbench", 6 | "type": "msedge", 7 | "request": "launch", 8 | "url": "https://{tenantDomain}/_layouts/workbench.aspx", 9 | "webRoot": "${workspaceRoot}", 10 | "sourceMaps": true, 11 | "sourceMapPathOverrides": { 12 | "webpack:///.././src/*": "${webRoot}/src/*", 13 | "webpack:///../../../src/*": "${webRoot}/src/*", 14 | "webpack:///../../../../src/*": "${webRoot}/src/*", 15 | "webpack:///../../../../../src/*": "${webRoot}/src/*" 16 | }, 17 | "runtimeArgs": [ 18 | "--remote-debugging-port=9222", 19 | "-incognito" 20 | ] 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /Demos/03-webpart/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | // Configure glob patterns for excluding files and folders in the file explorer. 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.DS_Store": true, 7 | "**/bower_components": true, 8 | "**/coverage": true, 9 | "**/jest-output": true, 10 | "**/lib-amd": true, 11 | "src/**/*.scss.ts": true 12 | }, 13 | "typescript.tsdk": ".\\node_modules\\typescript\\lib" 14 | } -------------------------------------------------------------------------------- /Demos/03-webpart/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "@microsoft/generator-sharepoint": { 3 | "plusBeta": false, 4 | "isCreatingSolution": true, 5 | "nodeVersion": "18.20.4", 6 | "sdksVersions": { 7 | "@microsoft/microsoft-graph-client": "3.0.2", 8 | "@microsoft/teams-js": "2.24.0" 9 | }, 10 | "version": "1.20.0", 11 | "libraryName": "hello-world", 12 | "libraryId": "58d1a1d0-097b-4d7f-8d8d-b4de9f45c2bf", 13 | "environment": "spo", 14 | "packageManager": "npm", 15 | "solutionName": "hello-world", 16 | "solutionShortDescription": "hello-world description", 17 | "skipFeatureDeployment": true, 18 | "isDomainIsolated": false, 19 | "componentType": "webpart" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Demos/03-webpart/README.md: -------------------------------------------------------------------------------- 1 | # hello-world 2 | 3 | ## Summary 4 | 5 | Short summary on functionality and used technologies. 6 | 7 | [picture of the solution in action, if possible] 8 | 9 | ## Used SharePoint Framework Version 10 | 11 | ![version](https://img.shields.io/badge/version-1.20.0-green.svg) 12 | 13 | ## Applies to 14 | 15 | - [SharePoint Framework](https://aka.ms/spfx) 16 | - [Microsoft 365 tenant](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) 17 | 18 | > Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram) 19 | 20 | ## Prerequisites 21 | 22 | > Any special pre-requisites? 23 | 24 | ## Solution 25 | 26 | | Solution | Author(s) | 27 | | ----------- | ------------------------------------------------------- | 28 | | folder name | Author details (name, company, twitter alias with link) | 29 | 30 | ## Version history 31 | 32 | | Version | Date | Comments | 33 | | ------- | ---------------- | --------------- | 34 | | 1.1 | March 10, 2021 | Update comment | 35 | | 1.0 | January 29, 2021 | Initial release | 36 | 37 | ## Disclaimer 38 | 39 | **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.** 40 | 41 | --- 42 | 43 | ## Minimal Path to Awesome 44 | 45 | - Clone this repository 46 | - Ensure that you are at the solution folder 47 | - in the command-line run: 48 | - **npm install** 49 | - **gulp serve** 50 | 51 | > Include any additional steps as needed. 52 | 53 | ## Features 54 | 55 | Description of the extension that expands upon high-level summary above. 56 | 57 | This extension illustrates the following concepts: 58 | 59 | - topic 1 60 | - topic 2 61 | - topic 3 62 | 63 | > Notice that better pictures and documentation will increase the sample usage and the value you are providing for others. Thanks for your submissions advance. 64 | 65 | > Share your web part with others through Microsoft 365 Patterns and Practices program to get visibility and exposure. More details on the community, open-source projects and other activities from http://aka.ms/m365pnp. 66 | 67 | ## References 68 | 69 | - [Getting started with SharePoint Framework](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) 70 | - [Building for Microsoft teams](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/build-for-teams-overview) 71 | - [Use Microsoft Graph in your solution](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis) 72 | - [Publish SharePoint Framework applications to the Marketplace](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/publish-to-marketplace-overview) 73 | - [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development 74 | -------------------------------------------------------------------------------- /Demos/03-webpart/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json", 3 | "version": "2.0", 4 | "bundles": { 5 | "hello-world-web-part": { 6 | "components": [ 7 | { 8 | "entrypoint": "./lib/webparts/helloWorld/HelloWorldWebPart.js", 9 | "manifest": "./src/webparts/helloWorld/HelloWorldWebPart.manifest.json" 10 | } 11 | ] 12 | } 13 | }, 14 | "externals": {}, 15 | "localizedResources": { 16 | "HelloWorldWebPartStrings": "lib/webparts/helloWorld/loc/{locale}.js" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Demos/03-webpart/config/deploy-azure-storage.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json", 3 | "workingDir": "./release/assets/", 4 | "account": "", 5 | "container": "hello-world", 6 | "accessKey": "" 7 | } -------------------------------------------------------------------------------- /Demos/03-webpart/config/package-solution.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", 3 | "solution": { 4 | "name": "hello-world-client-side-solution", 5 | "id": "58d1a1d0-097b-4d7f-8d8d-b4de9f45c2bf", 6 | "version": "1.0.0.0", 7 | "includeClientSideAssets": true, 8 | "skipFeatureDeployment": true, 9 | "isDomainIsolated": false, 10 | "developer": { 11 | "name": "", 12 | "websiteUrl": "", 13 | "privacyUrl": "", 14 | "termsOfUseUrl": "", 15 | "mpnId": "Undefined-1.20.0" 16 | }, 17 | "metadata": { 18 | "shortDescription": { 19 | "default": "hello-world description" 20 | }, 21 | "longDescription": { 22 | "default": "hello-world description" 23 | }, 24 | "screenshotPaths": [], 25 | "videoUrl": "", 26 | "categories": [] 27 | }, 28 | "features": [ 29 | { 30 | "title": "hello-world Feature", 31 | "description": "The feature that activates elements of the hello-world solution.", 32 | "id": "b7da0188-127d-4b48-af45-e743ca28383f", 33 | "version": "1.0.0.0" 34 | } 35 | ] 36 | }, 37 | "paths": { 38 | "zippedPackage": "solution/hello-world.sppkg" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Demos/03-webpart/config/sass.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json" 3 | } -------------------------------------------------------------------------------- /Demos/03-webpart/config/serve.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json", 3 | "port": 4321, 4 | "https": true, 5 | "initialPage": "https://{tenantDomain}/_layouts/workbench.aspx" 6 | } 7 | -------------------------------------------------------------------------------- /Demos/03-webpart/config/write-manifests.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json", 3 | "cdnBasePath": "" 4 | } -------------------------------------------------------------------------------- /Demos/03-webpart/gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const build = require('@microsoft/sp-build-web'); 4 | 5 | build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`); 6 | 7 | var getTasks = build.rig.getTasks; 8 | build.rig.getTasks = function () { 9 | var result = getTasks.call(build.rig); 10 | 11 | result.set('serve', result.get('serve-deprecated')); 12 | 13 | return result; 14 | }; 15 | 16 | build.initialize(require('gulp')); 17 | -------------------------------------------------------------------------------- /Demos/03-webpart/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-world", 3 | "version": "0.0.1", 4 | "private": true, 5 | "engines": { 6 | "node": ">=18.17.1 <19.0.0" 7 | }, 8 | "main": "lib/index.js", 9 | "scripts": { 10 | "build": "gulp bundle", 11 | "clean": "gulp clean", 12 | "test": "gulp test" 13 | }, 14 | "dependencies": { 15 | "tslib": "2.3.1", 16 | "@microsoft/sp-core-library": "1.20.0", 17 | "@microsoft/sp-component-base": "1.20.0", 18 | "@microsoft/sp-property-pane": "1.20.0", 19 | "@microsoft/sp-webpart-base": "1.20.0", 20 | "@microsoft/sp-lodash-subset": "1.20.0", 21 | "@microsoft/sp-office-ui-fabric-core": "1.20.0" 22 | }, 23 | "devDependencies": { 24 | "@microsoft/rush-stack-compiler-4.7": "0.1.0", 25 | "@rushstack/eslint-config": "4.0.1", 26 | "@microsoft/eslint-plugin-spfx": "1.20.2", 27 | "@microsoft/eslint-config-spfx": "1.20.2", 28 | "@microsoft/sp-build-web": "1.20.2", 29 | "@types/webpack-env": "~1.15.2", 30 | "ajv": "^6.12.5", 31 | "eslint": "8.57.0", 32 | "gulp": "4.0.2", 33 | "typescript": "4.7.4", 34 | "@microsoft/sp-module-interfaces": "1.20.2", 35 | "@fluentui/react": "^8.106.4" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Demos/03-webpart/src/index.ts: -------------------------------------------------------------------------------- 1 | // A file is required to be in the root of the /src directory by the TypeScript compiler 2 | -------------------------------------------------------------------------------- /Demos/03-webpart/src/webparts/helloWorld/HelloWorldWebPart.manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json", 3 | "id": "4f305338-fac1-4515-b720-5d606f2b5d45", 4 | "alias": "HelloWorldWebPart", 5 | "componentType": "WebPart", 6 | 7 | // The "*" signifies that the version should be taken from the package.json 8 | "version": "*", 9 | "manifestVersion": 2, 10 | 11 | // If true, the component can only be installed on sites where Custom Script is allowed. 12 | // Components that allow authors to embed arbitrary script code should set this to true. 13 | // https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f 14 | "requiresCustomScript": false, 15 | "supportedHosts": ["SharePointWebPart", "TeamsPersonalApp", "TeamsTab", "SharePointFullPage"], 16 | "supportsThemeVariants": true, 17 | 18 | "preconfiguredEntries": [{ 19 | "groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Advanced 20 | "group": { "default": "Advanced" }, 21 | "title": { "default": "HelloWorld" }, 22 | "description": { "default": "HelloWorld description" }, 23 | "officeFabricIconFontName": "Page", 24 | "properties": { 25 | "description": "HelloWorld" 26 | } 27 | }] 28 | } 29 | -------------------------------------------------------------------------------- /Demos/03-webpart/src/webparts/helloWorld/HelloWorldWebPart.module.scss: -------------------------------------------------------------------------------- 1 | @import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss'; 2 | 3 | .helloWorld { 4 | overflow: hidden; 5 | padding: 1em; 6 | color: "[theme:bodyText, default: #323130]"; 7 | color: var(--bodyText); 8 | &.teams { 9 | font-family: $ms-font-family-fallbacks; 10 | } 11 | } 12 | 13 | .welcome { 14 | text-align: center; 15 | } 16 | 17 | .welcomeImage { 18 | width: 100%; 19 | max-width: 420px; 20 | } 21 | 22 | .links { 23 | a { 24 | text-decoration: none; 25 | color: "[theme:link, default:#03787c]"; 26 | color: var(--link); // note: CSS Custom Properties support is limited to modern browsers only 27 | 28 | &:hover { 29 | text-decoration: underline; 30 | color: "[theme:linkHovered, default: #014446]"; 31 | color: var(--linkHovered); // note: CSS Custom Properties support is limited to modern browsers only 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Demos/03-webpart/src/webparts/helloWorld/HelloWorldWebPart.ts: -------------------------------------------------------------------------------- 1 | import { Version } from '@microsoft/sp-core-library'; 2 | import { 3 | type IPropertyPaneConfiguration, 4 | PropertyPaneTextField 5 | } from '@microsoft/sp-property-pane'; 6 | import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base'; 7 | import type { IReadonlyTheme } from '@microsoft/sp-component-base'; 8 | import { escape } from '@microsoft/sp-lodash-subset'; 9 | 10 | import styles from './HelloWorldWebPart.module.scss'; 11 | import * as strings from 'HelloWorldWebPartStrings'; 12 | 13 | export interface IHelloWorldWebPartProps { 14 | description: string; 15 | } 16 | 17 | export default class HelloWorldWebPart extends BaseClientSideWebPart { 18 | 19 | private _isDarkTheme: boolean = false; 20 | private _environmentMessage: string = ''; 21 | 22 | public render(): void { 23 | this.domElement.innerHTML = ` 24 |
25 |
26 | 27 |

Well done, ${escape(this.context.pageContext.user.displayName)}!

28 |
${this._environmentMessage}
29 |
Web part property value: ${escape(this.properties.description)}
30 |
31 |
32 |

Welcome to SharePoint Framework!

33 |

34 | The SharePoint Framework (SPFx) is a extensibility model for Microsoft Viva, Microsoft Teams and SharePoint. It's the easiest way to extend Microsoft 365 with automatic Single Sign On, automatic hosting and industry standard tooling. 35 |

36 |

Learn more about SPFx development:

37 | 46 |
47 |
`; 48 | } 49 | 50 | protected onInit(): Promise { 51 | return this._getEnvironmentMessage().then(message => { 52 | this._environmentMessage = message; 53 | }); 54 | } 55 | 56 | 57 | 58 | private _getEnvironmentMessage(): Promise { 59 | if (!!this.context.sdks.microsoftTeams) { // running in Teams, office.com or Outlook 60 | return this.context.sdks.microsoftTeams.teamsJs.app.getContext() 61 | .then(context => { 62 | let environmentMessage: string = ''; 63 | switch (context.app.host.name) { 64 | case 'Office': // running in Office 65 | environmentMessage = this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentOffice : strings.AppOfficeEnvironment; 66 | break; 67 | case 'Outlook': // running in Outlook 68 | environmentMessage = this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentOutlook : strings.AppOutlookEnvironment; 69 | break; 70 | case 'Teams': // running in Teams 71 | case 'TeamsModern': 72 | environmentMessage = this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentTeams : strings.AppTeamsTabEnvironment; 73 | break; 74 | default: 75 | environmentMessage = strings.UnknownEnvironment; 76 | } 77 | 78 | return environmentMessage; 79 | }); 80 | } 81 | 82 | return Promise.resolve(this.context.isServedFromLocalhost ? strings.AppLocalEnvironmentSharePoint : strings.AppSharePointEnvironment); 83 | } 84 | 85 | protected onThemeChanged(currentTheme: IReadonlyTheme | undefined): void { 86 | if (!currentTheme) { 87 | return; 88 | } 89 | 90 | this._isDarkTheme = !!currentTheme.isInverted; 91 | const { 92 | semanticColors 93 | } = currentTheme; 94 | 95 | if (semanticColors) { 96 | this.domElement.style.setProperty('--bodyText', semanticColors.bodyText || null); 97 | this.domElement.style.setProperty('--link', semanticColors.link || null); 98 | this.domElement.style.setProperty('--linkHovered', semanticColors.linkHovered || null); 99 | } 100 | 101 | } 102 | 103 | protected get dataVersion(): Version { 104 | return Version.parse('1.0'); 105 | } 106 | 107 | protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration { 108 | return { 109 | pages: [ 110 | { 111 | header: { 112 | description: strings.PropertyPaneDescription 113 | }, 114 | groups: [ 115 | { 116 | groupName: strings.BasicGroupName, 117 | groupFields: [ 118 | PropertyPaneTextField('description', { 119 | label: strings.DescriptionFieldLabel 120 | }) 121 | ] 122 | } 123 | ] 124 | } 125 | ] 126 | }; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /Demos/03-webpart/src/webparts/helloWorld/assets/welcome-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SharePoint/sp-dev-training-spfx-getting-started/9871638592d713c8d52108b00d10bdd896242b3b/Demos/03-webpart/src/webparts/helloWorld/assets/welcome-dark.png -------------------------------------------------------------------------------- /Demos/03-webpart/src/webparts/helloWorld/assets/welcome-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SharePoint/sp-dev-training-spfx-getting-started/9871638592d713c8d52108b00d10bdd896242b3b/Demos/03-webpart/src/webparts/helloWorld/assets/welcome-light.png -------------------------------------------------------------------------------- /Demos/03-webpart/src/webparts/helloWorld/loc/en-us.js: -------------------------------------------------------------------------------- 1 | define([], function() { 2 | return { 3 | "PropertyPaneDescription": "Description", 4 | "BasicGroupName": "Group Name", 5 | "DescriptionFieldLabel": "Description Field", 6 | "AppLocalEnvironmentSharePoint": "The app is running on your local environment as SharePoint web part", 7 | "AppLocalEnvironmentTeams": "The app is running on your local environment as Microsoft Teams app", 8 | "AppLocalEnvironmentOffice": "The app is running on your local environment in office.com", 9 | "AppLocalEnvironmentOutlook": "The app is running on your local environment in Outlook", 10 | "AppSharePointEnvironment": "The app is running on SharePoint page", 11 | "AppTeamsTabEnvironment": "The app is running in Microsoft Teams", 12 | "AppOfficeEnvironment": "The app is running in office.com", 13 | "AppOutlookEnvironment": "The app is running in Outlook", 14 | "UnknownEnvironment": "The app is running in an unknown environment" 15 | } 16 | }); -------------------------------------------------------------------------------- /Demos/03-webpart/src/webparts/helloWorld/loc/mystrings.d.ts: -------------------------------------------------------------------------------- 1 | declare interface IHelloWorldWebPartStrings { 2 | PropertyPaneDescription: string; 3 | BasicGroupName: string; 4 | DescriptionFieldLabel: string; 5 | AppLocalEnvironmentSharePoint: string; 6 | AppLocalEnvironmentTeams: string; 7 | AppLocalEnvironmentOffice: string; 8 | AppLocalEnvironmentOutlook: string; 9 | AppSharePointEnvironment: string; 10 | AppTeamsTabEnvironment: string; 11 | AppOfficeEnvironment: string; 12 | AppOutlookEnvironment: string; 13 | UnknownEnvironment: string; 14 | } 15 | 16 | declare module 'HelloWorldWebPartStrings' { 17 | const strings: IHelloWorldWebPartStrings; 18 | export = strings; 19 | } 20 | -------------------------------------------------------------------------------- /Demos/03-webpart/teams/4f305338-fac1-4515-b720-5d606f2b5d45_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SharePoint/sp-dev-training-spfx-getting-started/9871638592d713c8d52108b00d10bdd896242b3b/Demos/03-webpart/teams/4f305338-fac1-4515-b720-5d606f2b5d45_color.png -------------------------------------------------------------------------------- /Demos/03-webpart/teams/4f305338-fac1-4515-b720-5d606f2b5d45_outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SharePoint/sp-dev-training-spfx-getting-started/9871638592d713c8d52108b00d10bdd896242b3b/Demos/03-webpart/teams/4f305338-fac1-4515-b720-5d606f2b5d45_outline.png -------------------------------------------------------------------------------- /Demos/03-webpart/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/@microsoft/rush-stack-compiler-4.7/includes/tsconfig-web.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "forceConsistentCasingInFileNames": true, 6 | "module": "esnext", 7 | "moduleResolution": "node", 8 | "jsx": "react", 9 | "declaration": true, 10 | "sourceMap": true, 11 | "experimentalDecorators": true, 12 | "skipLibCheck": true, 13 | "outDir": "lib", 14 | "inlineSources": false, 15 | "noImplicitAny": true, 16 | 17 | "typeRoots": [ 18 | "./node_modules/@types", 19 | "./node_modules/@microsoft" 20 | ], 21 | "types": [ 22 | "webpack-env" 23 | ], 24 | "lib": [ 25 | "es5", 26 | "dom", 27 | "es2015.collection", 28 | "es2015.promise" 29 | ] 30 | }, 31 | "include": [ 32 | "src/**/*.ts", 33 | "src/**/*.tsx" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /Demos/README.md: -------------------------------------------------------------------------------- 1 | # Microsoft SharePoint Framework Training Module - Getting Started with the SharePoint Framework 2 | 3 | This folder contains demos associated with the slide decks in this module. 4 | 5 | ## Demos 6 | 7 | * [Create & Configure your SharePoint Online Developer Tenant](./01-appcatalog) 8 | * [Setup your local SPFx Developer Environment](./02-setup-env) 9 | * [Interact with SPFx Client-Side Web Parts in Modern Sites](./03-webpart) 10 | 11 | ## Running demonstrations 12 | 13 | Each demonstration is included as source code for convenience. 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Microsoft SharePoint Framework Training Module - Getting Started with the SharePoint Framework 2 | 3 | This module will introduce you to the SharePoint Framework as well as walk you through getting your local & online environment configured for developing with the SharePoint Framework. 4 | 5 | > This module is also published as a Microsoft Learn module: [Getting Started with the SharePoint Framework](https://learn.microsoft.com/training/modules/sharepoint-spfx-get-started) 6 | 7 | ## Lab - Getting Started with the SharePoint Framework 8 | 9 | The lab for this module is available in multiple units within the associated Microsoft Learn module. Use the following links to jump to the specific unit. Each Microsoft Learn unit represents a different lab exercise & demo in the presentation. 10 | 11 | 1. [Exercise - Create and configure your SharePoint Online developer tenant](https://learn.microsoft.com/training/modules/sharepoint-spfx-get-started/3-exercise-configure-tenant) 12 | 13 | In this exercise, you'll configure your SharePoint environment to be ready for SharePoint Framework development. 14 | 15 | 1. [Exercise - Configure your SharePoint Framework development environment](https://learn.microsoft.com/training/modules/sharepoint-spfx-get-started/5-exercise-setup-development-environment) 16 | 17 | In this exercise, you set up your local developer environment with everything you need to start creating SharePoint Framework components. 18 | 19 | 1. [Exercise - Interact with SPFx client-side web parts in modern sites](https://learn.microsoft.com/training/modules/sharepoint-spfx-get-started/7-exercise-client-side-web-parts) 20 | 21 | In this exercise, you'll add and interact with Framework-based client-side web parts in a SharePoint Online modern site collection. 22 | 23 | ## Demos 24 | 25 | - [Create and configure your SharePoint Online developer tenant](./Demos/01-appcatalog) 26 | - [Configure your SharePoint Framework development environment](./Demos/02-setup-env) 27 | - [Interact with SPFx client-side web parts in modern sites](./Demos/03-webpart) 28 | 29 | ## Watch the Module - Video 30 | 31 | This module has been recorded and is available in the SharePoint Development YouTube channel: [SharePoint Framework Training - Getting Started with the SharePoint Framework](https://www.youtube.com/watch?v=_Pt5cnU4MpU&list=PLR9nK3mnD-OV-RPXQ3Lco845qoEy7VJoc) 32 | 33 | ## Contributors 34 | 35 | | Roles | Author(s) | 36 | | -------------------- | -------------------------------------------------------------------------------------------------------------- | 37 | | Lab Manuals / Slides | Andrew Connell (Microsoft MVP, [Voitanos](//github.com/voitanos)) [@andrewconnell](//github.com/andrewconnell) | 38 | | QA | Rob Windsor (Microsoft MVP) [@rob-windsor](//github.com/rob-windsor) | 39 | | Sponsor / Support | Vesa Juvonen (Microsoft) [@VesaJuvonen](//github.com/VesaJuvonen) | 40 | 41 | ## Version history 42 | 43 | | Version | Date | Comments | 44 | | ------- | ------------------ | -------------------------------------------------- | 45 | | 1.21 | December 13, 2024 | FY2025Q2 content refresh; update to SPFx v1.20.0 | 46 | | 1.20 | June 12, 2024 | FY2024Q4 content refresh; update to SPFx v1.19.0 | 47 | | 1.19 | May 5, 2023 | FY2023Q4 content refresh; update to SPFx v1.17.1 | 48 | | 1.18 | February 28, 2023 | FY2023Q3 content refresh; update to SPFx v1.16.1 | 49 | | 1.17 | December 5, 2022 | FY2023Q1 content refresh | 50 | | 1.16 | September 5, 2022 | FY2023Q1 content refresh; update for SPFx v1.15.2 | 51 | | 1.15 | May 2, 2022 | FY2022Q4 content refresh; update for SPFx v1.14 | 52 | | 1.14 | March 7, 2022 | FY2022Q3 content refresh | 53 | | 1.13 | December 8, 2021 | FY2022Q2 content refresh; retire local workbench | 54 | | 1.12 | September 13, 2021 | FY2022Q1 content refresh | 55 | | 1.11 | June 17, 2021 | FY2021Q4 content refresh | 56 | | 1.10 | March 6, 2021 | FY2021Q3 content refresh | 57 | | 1.9 | November 30, 2020 | FY2021Q2 content refresh | 58 | | 1.8 | August 31, 2020 | FY2021Q1 content refresh | 59 | | 1.7 | March 10, 2020 | FY2020Q3 content refresh & port module to MS Learn | 60 | | 1.6 | December 6, 2019 | FY2020Q2 content refresh | 61 | | 1.5 | September 2, 2019 | FY2020Q1 content refresh | 62 | | 1.4 | May 24, 2019 | FY2019Q4 content refresh | 63 | | 1.3 | March 6, 2019 | FY2019Q3 content refresh | 64 | | 1.2 | December 17, 2018 | FY2019Q2 content refresh | 65 | | 1.1 | September 28, 2018 | Rewritten to use latest guidance | 66 | | 1.0 | ~February 2017 | Initial release | 67 | 68 | ## Disclaimer 69 | 70 | **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.** 71 | 72 | ## Contributing 73 | 74 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 75 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 76 | the rights to use your contribution. For details, visit https://cla.microsoft.com. 77 | 78 | When you submit a pull request, a CLA-bot will automatically determine whether you need to provide 79 | a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions 80 | provided by the bot. You will only need to do this once across all repos using our CLA. 81 | 82 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 83 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 84 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 85 | 86 | 87 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | --------------------------------------------------------------------------------