Today finally has the new progress, is no longer the environment is not on the fool, Friday the iron children should have a holiday, I wish teachers a happy holiday.
Open source tools
The three categories to explore are as follows: Build process and tools Web framework code editors
Tool is introduced
Gulp is a task runner that replaces MSBuild, a tool used in.NET solutions. This is used to run a variety of tasks, such as converting TypeScript to JavaScript, creating JavaScript packages, and SharePoint packages node.js is the underlying runtime used by all applications. The tools described here are built on top of Node.js. You need Node.js to run them, just as you need the.NET Framework to run.NET applications.
NPM serves as the package manager that you will use to install global tools and reusable code in your project. Webpack is used to combine all the JavaScript and CSS files in a project into one JavaScript package. Bundling is the recommended way to deploy client applications for performance reasons.
The code editor will use VScode as recommended by the documentation or whatever
Installation node. Js
The documentation states that the framework relies on Node.js but you don’t have to be a good Node.js developer. This will save you from having to worry about environment variables and open CMD ->node -v after installation.
You can choose the appropriate version, and if not required, the latest version is fine by default.
Install the Yeoman
Open the CMD
npm install --global yo
If the installation encounters problems, for example, nodejs “NPM ERR! Code SELF_SIGNED_CERT_IN_CHAIN”
Run the NPM config set strict-ssl false command
Install Gulp
Gulp is a task running tool. It is similar to MSBuild, a tool that.NET developers and Visual Studio use to compile projects, package solutions, and start debugging experiences.
npm install --global gulp
Install the SharePoint framework Yeoman generator
Microsoft has created the Yeoman generator for building SharePoint framework projects.
The latest is installed by default
npm install --global @microsoft/generator-sharepoint
If you want to install the specified version
··· NPM install –global @Microsoft/Generator-Sharepoint @[version number]···
The fewest tools that must be installed in the development environment to build SharePoint framework components are
Node.js Gulp Yeoman and SharePoint Yeoman generators
Execute the Yeoman generator
yo @microsoft/sharepoint
Verify the installation is correct.
Use the following to complete the prompt that is displayed:
- What is your solution name? : HelloWorld
- Which baseline packages do you want to target for your component(s)? : SharePoint Online only (latest)
- Where do you want to place the files? : Use the current folder
- Do you want to allow the tenant admin the choice of being able to deploy the solution to all sites immediately without running any feature deployment or adding apps in sites? : No
- Will the components in the solution require permissions to access web APIs that are unique and not shared with other components in the tenant? : No
- Which type of client-side component to create? : WebPart
- What is your Web part name? : HelloWorld
- What is your Web part description? : HelloWorld description
- Which framework would you like to use? : No JavaScript framework
If you have completed the above steps then create a SharePoint resource in your file and execute the following command:
Gulp trust-dev-cert will generate a certificate, this step will be quick. Then run the command gulp serve will generate a workbench using your default browser
This step may take a little longer to execute, wait patiently for a while and see a workbench pop up in your browser window
Click the + sign, select Add WebPart and you’ll see the default generated WebPart
So far is complete, the basic installation of SharePoint framework is finished, of course, if you have related installation problems can also leave a message, ok, learn and record, hope to go further, the leadership of what level are very high ah, really powerful. Keep learning, Keep Moving.