#Run Command window as Administrator------------------------------------------------ #Right click shortcut -> properties -> Shortcut -> Advanced -> Run as Administrator #Check the version of NodeJS (re-run installer if it doesn't match current LTS)----- node -v #Check global top-level packages (if desired)--------------------------------------- npm ls -g --depth=0 #Ensure you have the latest version of NPM------------------------------------------ npm install -g npm #Ensure you have the latest version of yo and gulp---------------------------------- npm install -g yo gulp #Ensure you have the latest version of SPFx Generator------------------------------- npm install -g @microsoft/generator-sharepoint #Create Directory------------------------------------------------------------------- md hello-chicago #Change Directory------------------------------------------------------------------- cd hello-chicago #Scaffold--------------------------------------------------------------------------- yo @microsoft/sharepoint #Run Solution----------------------------------------------------------------------- gulp serve #Dev Certificate (won't work on new versions of Chrome)----------------------------- gulp trust-dev-cert #Open Solution---------------------------------------------------------------------- code . #Adding a Property to IHelloWorldWebPartProps-------------------------------------- color: string #Adding a Property to getPropertyPaneConfiguration---------------------------------- PropertyPaneDropdown('color', { label: "Color", options: [ {text:'Theme', key:'themePrimary'}, {text:'Neutral', key:'neutralPrimary'}, {text:'Yellow', key:'yellow'}, {text:'Dark Red', key:'redDark'}, {text:'Dark Purple', key:'purpleDark'}, {text:'Teal', key:'teal'} ] }) #Using color in section-------------------------------------------------------------
Administration Information Facilities Operations Sales Marketing #schema.xml main.xsl clienttemplates.js 30
#package-solution.json "features": [{ "title": "asset-deployment-webpart-client-side-solution", "description": "asset-deployment-webpart-client-side-solution", "id": "523fe887-ced5-4036-b564-8dad5c6c6e24", "version": "1.0.0.0", "assets": { "elementManifests": [ "elements.xml" ], "elementFiles":[ "schema.xml" ] } }]