The web part is running on the browser that runs in the context of a SharePoint page.
And required only clients side scripting languages to make it run.
It can be deployed to SharePoint environments that support the SharePoint Framework. You can also use modern JavaScript web frameworks, to build them.
Support:
- It can be built with HTML and JavaScript with a specific framework.
- It supports SharePoint Online and on-premises.
Create a new web part using Visual Studio Code to
Below are the step
- Go to the Open folder by clicking on the File section
- Create a folder and open it.
- Click into the terminal and select new terminal
- Write the script there in the new terminal
Yo @microsoft/Sharepoint
- You see at the terminal window, a new promote open, here you need to give a new for the solution, in my case I give It the name HelloLife.
Yo @microsoft/Sharepoint
- Then it will ask you to select the folder
- Then showing, in my case I select N
Then again, I select N
Now the things are almost done, now, you got three options
- WebPart
- Extension
- Library
So, now we select the first option, to create WebPart
Now the new screen appearing and saying to select one of the frameworks from default there office 365 give the freedom to developers to choose any of the frameworks from default or you can select No JavaScript framework.
after selecting and pressing enter it will start the process of downloading all the required packages and library’s, it will take some time to download
Once it is completed, a new screen appears, now you can see the complete structure of the solution, in the below images
Inside the src/components folder, you can get the file structure name as we gave to the component name
Now, all is done and need to run some more command by opening the terminal window
After the server going to start, on the terminal a screen showing lines of text and open a web page with localhost workbench.
Here you can see, our web part appearing on the new web part area
Comments
Post a Comment